-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8186 from kenjis/fix-HTTP-verb-cases
fix: remove deprecated upper functionality in `Request::getMethod()`
- Loading branch information
Showing
55 changed files
with
439 additions
and
241 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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 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 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 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.