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 b413205 commit 60f7e69
Show file tree
Hide file tree
Showing 3 changed files with 17 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 @@ -39,6 +37,8 @@ See :ref:`Upgrading Guide <upgrade-450-nested-route-groups-and-options>` for det
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
17 changes: 12 additions & 5 deletions user_guide_src/source/installation/upgrade_450.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,24 @@ has been removed.

If you extneds ``BaseModel``, implement the ``getIdValue()`` method in the child 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.

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 60f7e69

Please sign in to comment.