-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: remove deprecated upper functionality in Request::getMethod()
#8186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
88c89d0
refactor!: remove $upper functionality in Request::getMethod()
kenjis 5bd6cbb
refactor: remove strtoupper()/strtolower() for $request->getMethod()
kenjis 111d73b
chore: update phpstan-baseline.php
kenjis 38e0f58
docs: add doc comment
kenjis 7d866e2
docs: update existing docs
kenjis aca22d1
refactor: remove feature flag
kenjis 0b6a273
docs: change Filters::$methods keys to uppercase
kenjis f54e420
test: change Filters::$methods keys to uppercase
kenjis d397154
docs: add changelog and upgrade
kenjis 905c3d1
test: fix $routes->match() HTTP verbs
kenjis a09e750
test: fix $request->setMethod() HTTP verbs
kenjis b4a70bb
docs: fix $routes->match() HTTP verbs
kenjis 1c50d82
docs: fix $client->request() HTTP verbs
kenjis 303eaa1
docs: add about CURLRequest::request() HTTP verbs
kenjis 6aff805
refactor: fix HTTP verbs for FeatureTestTrait::withRoutes()
kenjis 399367e
docs: add deprecated features that accept lowercase HTTP methods
kenjis ad3bb95
docs: add section "Core Class Changes"
kenjis 8680872
docs: add about lowercase HTTP method name
kenjis 8d92882
feat: add HTTP\Method class
kenjis a394ac0
docs: add doc comment
kenjis 7149fa5
refactor: use HTTP\Method constants
kenjis cb35ef7
test: use HTTP\Method constants
kenjis 375c340
feat: add trigger_error E_USER_DEPRECATED
kenjis fe6babf
test: replace 'get' with 'GET'
kenjis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of CodeIgniter 4 framework. | ||
* | ||
* (c) CodeIgniter Foundation <[email protected]> | ||
* | ||
* For the full copyright and license information, please view | ||
* the LICENSE file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CodeIgniter\HTTP; | ||
|
||
/** | ||
* HTTP Method List | ||
*/ | ||
class Method | ||
{ | ||
/** | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT | ||
*/ | ||
public const CONNECT = 'CONNECT'; | ||
|
||
/** | ||
* Idempotent | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE | ||
*/ | ||
public const DELETE = 'DELETE'; | ||
|
||
/** | ||
* Safe, Idempotent, Cacheable | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET | ||
*/ | ||
public const GET = 'GET'; | ||
|
||
/** | ||
* Safe, Idempotent, Cacheable | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD | ||
*/ | ||
public const HEAD = 'HEAD'; | ||
|
||
/** | ||
* Safe, Idempotent | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS | ||
*/ | ||
public const OPTIONS = 'OPTIONS'; | ||
|
||
/** | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH | ||
*/ | ||
public const PATCH = 'PATCH'; | ||
|
||
/** | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST | ||
*/ | ||
public const POST = 'POST'; | ||
|
||
/** | ||
* Idempotent | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT | ||
*/ | ||
public const PUT = 'PUT'; | ||
|
||
/** | ||
* Safe, Idempotent | ||
* | ||
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/TRACE | ||
*/ | ||
public const TRACE = 'TRACE'; | ||
|
||
/** | ||
* Returns all HTTP methods. | ||
* | ||
* @return list<string> | ||
*/ | ||
public static function all(): array | ||
{ | ||
return [ | ||
self::CONNECT, | ||
self::DELETE, | ||
self::GET, | ||
self::HEAD, | ||
self::OPTIONS, | ||
self::PATCH, | ||
self::POST, | ||
self::PUT, | ||
self::TRACE, | ||
]; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.