Skip to content

Commit 60f7e69

Browse files
committed
docs: modify the upgrade docs.
1 parent b413205 commit 60f7e69

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

user_guide_src/source/changelogs/v4.5.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ Highlights
1818
BREAKING
1919
********
2020

21-
- **AutoRouting Legacy:** Add a condition to check if the controller exists.
22-
2321
Behavior Changes
2422
================
2523

@@ -39,6 +37,8 @@ See :ref:`Upgrading Guide <upgrade-450-nested-route-groups-and-options>` for det
3937
Others
4038
------
4139

40+
- **AutoRouting Legacy:** Changed so that a ``PageNotFoundException`` is thrown
41+
if the controller corresponding to the request URI does not exist.
4242
- **Logger:** The :php:func:`log_message()` function and the logger methods in
4343
``CodeIgniter\Log\Logger`` now do not return ``bool`` values. The return types
4444
have been fixed to ``void`` to follow the PSR-3 interface.

user_guide_src/source/incoming/controllers.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,9 @@ without route definitions. The auto-routing is disabled by default.
412412

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

415-
.. 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**.
415+
.. important:: Since v4.5.0, if Auto Routing (Legacy) doesn't find the controller,
416+
it will throw ``PageNotFoundException`` exception before the Controller Filters
417+
execute.
416418

417419
Consider this URI::
418420

user_guide_src/source/installation/upgrade_450.rst

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,24 @@ has been removed.
119119

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

122+
Auto Routing (Legacy)
123+
=====================
124+
125+
In previous versions, the controller filters might be executed even when the
126+
corresponding controller was not found.
127+
128+
This bug has been fixed and now a ``PageNotFoundException`` will be thrown and
129+
the filters will not be executed if the controller is not found.
130+
131+
If you have code that depends on this bug, for example if you expect global filters
132+
to be executed even for non-existent pages, please add the necessary routes.
133+
122134
Removed Deprecated Items
123135
========================
124136

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

128-
Auto Routing (Legacy)
129-
=======================
130-
131-
If the auto routing cannot found the controller, it will throw page not found exception before the filter executed.
132-
133140
Breaking Enhancements
134141
*********************
135142

0 commit comments

Comments
 (0)