-
Notifications
You must be signed in to change notification settings - Fork 3.4k
6.x Adding Attribute routing #19293
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
6.x Adding Attribute routing #19293
Changes from 4 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
fd73ae5
Adding initial attribute routing support
josbeir b517a0a
Merge remote-tracking branch 'origin/6.x' into 6.x-attribute-routing
josbeir 77ca3ef
improve and optimize implementation
josbeir b741596
feat: introduce MethodVisibility to attributeResolver which opens doo…
josbeir a55341f
fix _ext wrongly assigned + make attributeKey more unique
josbeir f7fa89e
refactor: attributes() => connectAttributes()
josbeir 1869eba
refactor: AttributeResolver's enum usage of CLASS_TYPE is now renamed…
josbeir 9eacdda
Merge remote-tracking branch 'origin/6.x' into 6.x-attribute-routing
josbeir a839d54
refactor: make attribute classes readonly
josbeir ae4c935
feat: introduce support for static closures in the middleware attribute
josbeir 6868096
Merge branch '6.x' into 6.x-attribute-routing
josbeir 1aa5fc6
Merge branch '6.x' into 6.x-attribute-routing
josbeir 69bab9a
Merge branch '6.x' into 6.x-attribute-routing
josbeir af581e4
add integration tests for the middleware attribute
josbeir eed6b6f
Merge branch '6.x' into 6.x-attribute-routing
josbeir de0b852
match the Extensions attribute constructor with RouteBuilder::setExte…
josbeir 6eda4e3
Merge branch '6.x' into 6.x-attribute-routing
LordSimal 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| <?php | ||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) | ||
| * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) | ||
| * | ||
| * Licensed under The MIT License | ||
| * For full copyright and license information, please see the LICENSE.txt | ||
| * Redistributions of files must retain the above copyright notice. | ||
| * | ||
| * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) | ||
| * @link https://cakephp.org CakePHP(tm) Project | ||
| * @since 6.0.0 | ||
| * @license https://opensource.org/licenses/mit-license.php MIT License | ||
| */ | ||
| namespace Cake\AttributeResolver\Enum; | ||
|
|
||
| /** | ||
| * Enum representing the declaring class kind for an attribute target. | ||
| */ | ||
| enum DeclaringClassType: string | ||
| { | ||
| /** | ||
| * Declaring type is a class. | ||
| */ | ||
| case CLASS_TYPE = 'class'; | ||
|
|
||
| /** | ||
| * Declaring type is an interface. | ||
| */ | ||
| case INTERFACE = 'interface'; | ||
|
|
||
| /** | ||
| * Declaring type is a trait. | ||
| */ | ||
| case TRAIT = 'trait'; | ||
|
|
||
| /** | ||
| * Declaring type is an enum. | ||
| */ | ||
| case ENUM = 'enum'; | ||
| } | ||
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,38 @@ | ||
| <?php | ||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) | ||
| * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) | ||
| * | ||
| * Licensed under The MIT License | ||
| * For full copyright and license information, please see the LICENSE.txt | ||
| * Redistributions of files must retain the above copyright notice. | ||
| * | ||
| * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) | ||
| * @link https://cakephp.org CakePHP(tm) Project | ||
| * @since 6.0.0 | ||
| * @license https://opensource.org/licenses/mit-license.php MIT License | ||
| */ | ||
| namespace Cake\AttributeResolver\Enum; | ||
|
|
||
| /** | ||
| * Enum representing method visibility levels. | ||
| */ | ||
| enum MethodVisibility: string | ||
| { | ||
| /** | ||
| * Public visibility. | ||
| */ | ||
| case PUBLIC = 'public'; | ||
|
|
||
| /** | ||
| * Protected visibility. | ||
| */ | ||
| case PROTECTED = 'protected'; | ||
|
|
||
| /** | ||
| * Private visibility. | ||
| */ | ||
| case PRIVATE = 'private'; | ||
| } |
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.
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.