File tree Expand file tree Collapse file tree 2 files changed +33
-4
lines changed Expand file tree Collapse file tree 2 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,16 @@ Others
118
118
Removed Deprecated Items
119
119
========================
120
120
121
+ Request
122
+ -------
123
+
124
+ - The ``$upper `` parameter in ``getMethod() `` in ``RequestInterface `` and ``Request ``
125
+ has been removed. See :ref: `upgrade-450-lowercase-http-method-name `.
126
+ - The deprecated ``isValidIP() `` method in ``RequestInterface `` and ``Request ``
127
+ has been removed.
128
+ - The visibility of the deprecated properties ``$uri `` and ``$config `` in
129
+ ``IncomingRequest `` has been changed to protected.
130
+
121
131
Filters
122
132
-------
123
133
@@ -183,10 +193,6 @@ Spark Commands
183
193
Others
184
194
------
185
195
186
- - **IncomingRequest: ** The visibility of the deprecated properties ``$uri `` and
187
- ``$config `` has been changed to protected.
188
- - **RequestInterface: ** The deprecated ``isValidIP() `` method has been removed.
189
- - **Request: ** The deprecated ``isValidIP() `` method has been removed.
190
196
- **Config: ** The deprecated ``CodeIgniter\Config\Config `` class has been removed.
191
197
192
198
Enhancements
Original file line number Diff line number Diff line change @@ -18,6 +18,29 @@ Mandatory File Changes
18
18
Breaking Changes
19
19
****************
20
20
21
+ .. _upgrade-450-lowercase-http-method-name :
22
+
23
+ Lowercase HTTP Method Name
24
+ ==========================
25
+
26
+ For historical reasons, ``Request::getMethod() `` returned HTTP method names in
27
+ lower case by default.
28
+
29
+ But the method token is case-sensitive because it might be used as a gateway
30
+ to object-based systems with case-sensitive method names. By convention,
31
+ standardized methods are defined in all-uppercase US-ASCII letters.
32
+ See https://www.rfc-editor.org/rfc/rfc9110#name-overview.
33
+
34
+ Now the deprecated ``$upper `` parameter in ``Request::getMethod() `` has been
35
+ removed, and the ``getMethod() `` returns the as-is HTTP method name. That is,
36
+ uppercase like "GET", "POST", and so on.
37
+
38
+ If you want lowercase HTTP method names, use PHP's ``strtolower() `` function::
39
+
40
+ strtolower($request->getMethod())
41
+
42
+ And you should use uppercase HTTP method names in your app code.
43
+
21
44
.. _upgrade-450-nested-route-groups-and-options :
22
45
23
46
Nested Route Groups and Options
You can’t perform that action at this time.
0 commit comments