Skip to content

Commit

Permalink
docs: modify the upgrade docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ping-yee committed Oct 24, 2023
1 parent b9dc457 commit 25e3900
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions user_guide_src/source/changelogs/v4.5.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ Highlights
BREAKING
********

- **AutoRouting Legacy:** Add a condition to check if the controller exists.

Behavior Changes
================

Expand All @@ -45,6 +43,8 @@ class, and even if it were extended, there is no way to replace it.
Others
------

- **AutoRouting Legacy:** Changed so that a ``PageNotFoundException`` is thrown
if the controller corresponding to the request URI does not exist.
- **Logger:** The :php:func:`log_message()` function and the logger methods in
``CodeIgniter\Log\Logger`` now do not return ``bool`` values. The return types
have been fixed to ``void`` to follow the PSR-3 interface.
Expand Down
4 changes: 3 additions & 1 deletion user_guide_src/source/incoming/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ without route definitions. The auto-routing is disabled by default.

.. important:: Auto Routing (Legacy) routes a HTTP request with **any** HTTP method to a controller method.

.. important:: If Auto Routing (Legacy) doesn't find the controller, it will throw page not found exception before the filter executes in version **4.5**.
.. important:: Since v4.5.0, if Auto Routing (Legacy) doesn't find the controller,
it will throw ``PageNotFoundException`` exception before the Controller Filters
execute.

Consider this URI::

Expand Down
19 changes: 14 additions & 5 deletions user_guide_src/source/installation/upgrade_450.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,33 @@ has been removed.

If you extneds ``BaseModel``, implement the ``getIdValue()`` method in the child class.

<<<<<<< HEAD
Factories
=========

:doc:`../concepts/factories` has been changed to a final class.
In the unlikely event, you have inherited the Factories, stop inheriting and
copy the code into your Factories class.
=======
Auto Routing (Legacy)
=====================

In previous versions, the controller filters might be executed even when the
corresponding controller was not found.

This bug has been fixed and now a ``PageNotFoundException`` will be thrown and
the filters will not be executed if the controller is not found.

If you have code that depends on this bug, for example if you expect global filters
to be executed even for non-existent pages, please add the necessary routes.
>>>>>>> 60f7e69cf4 (docs: modify the upgrade docs.)

Removed Deprecated Items
========================

Some deprecated items have been removed. If you extend these classes and are
using them, upgrade your code. See :ref:`ChangeLog <v450-removed-deprecated-items>` for details.

Auto Routing (Legacy)
=======================

If the auto routing cannot found the controller, it will throw page not found exception before the filter executed.

Breaking Enhancements
*********************

Expand Down

0 comments on commit 25e3900

Please sign in to comment.