Skip to content

Commit

Permalink
docs: add changelog and upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Nov 10, 2023
1 parent bd8a0fd commit 4392c3b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
14 changes: 10 additions & 4 deletions user_guide_src/source/changelogs/v4.5.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ Others
Removed Deprecated Items
========================

Request
-------

- The ``$upper`` parameter in ``getMethod()`` in ``RequestInterface`` and ``Request``
has been removed. See :ref:`upgrade-450-lowercase-http-method-name`.
- The deprecated ``isValidIP()`` method in ``RequestInterface`` and ``Request``
has been removed.
- The visibility of the deprecated properties ``$uri`` and ``$config`` in
``IncomingRequest`` has been changed to protected.

Filters
-------

Expand Down Expand Up @@ -183,10 +193,6 @@ Spark Commands
Others
------

- **IncomingRequest:** The visibility of the deprecated properties ``$uri`` and
``$config`` has been changed to protected.
- **RequestInterface:** The deprecated ``isValidIP()`` method has been removed.
- **Request:** The deprecated ``isValidIP()`` method has been removed.
- **Config:** The deprecated ``CodeIgniter\Config\Config`` class has been removed.

Enhancements
Expand Down
23 changes: 23 additions & 0 deletions user_guide_src/source/installation/upgrade_450.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,29 @@ Mandatory File Changes
Breaking Changes
****************

.. _upgrade-450-lowercase-http-method-name:

Lowercase HTTP Method Name
==========================

For historical reasons, ``Request::getMethod()`` returned HTTP method names in
lower case by default.

But the method token is case-sensitive because it might be used as a gateway
to object-based systems with case-sensitive method names. By convention,
standardized methods are defined in all-uppercase US-ASCII letters.
See https://www.rfc-editor.org/rfc/rfc9110#name-overview.

Now the deprecated ``$upper`` parameter in ``Request::getMethod()`` has been
removed, and the ``getMethod()`` returns the as-is HTTP method name. That is,
uppercase like "GET", "POST", and so on.

If you want lowercase HTTP method names, use PHP's ``strtolower()`` function::

strtolower($request->getMethod())

And you should use uppercase HTTP method names in your app code.

.. _upgrade-450-nested-route-groups-and-options:

Nested Route Groups and Options
Expand Down

0 comments on commit 4392c3b

Please sign in to comment.