-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] Add --method
option to debug:router
command
#59909
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
nicolas-grekas
merged 1 commit into
symfony:7.3
from
santysisi:feature_add-http-method-filter-to-debug-router
Mar 13, 2025
Merged
Changes from all commits
Commits
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
38 changes: 38 additions & 0 deletions
38
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_2.json
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 @@ | ||
{ | ||
"route_1": { | ||
"path": "\/hello\/{name}", | ||
"pathRegex": "#PATH_REGEX#", | ||
"host": "localhost", | ||
"hostRegex": "#HOST_REGEX#", | ||
"scheme": "http|https", | ||
"method": "GET|HEAD", | ||
"class": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\RouteStub", | ||
"defaults": { | ||
"name": "Joseph" | ||
}, | ||
"requirements": { | ||
"name": "[a-z]+" | ||
}, | ||
"options": { | ||
"compiler_class": "Symfony\\Component\\Routing\\RouteCompiler", | ||
"opt1": "val1", | ||
"opt2": "val2" | ||
} | ||
}, | ||
"route_3": { | ||
"path": "\/other\/route", | ||
"pathRegex": "#PATH_REGEX#", | ||
"host": "localhost", | ||
"hostRegex": "#HOST_REGEX#", | ||
"scheme": "http|https", | ||
"method": "ANY", | ||
"class": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\RouteStub", | ||
"defaults": [], | ||
"requirements": "NO CUSTOM", | ||
"options": { | ||
"compiler_class": "Symfony\\Component\\Routing\\RouteCompiler", | ||
"opt1": "val1", | ||
"opt2": "val2" | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_2.md
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,37 @@ | ||
route_1 | ||
------- | ||
|
||
- Path: /hello/{name} | ||
- Path Regex: #PATH_REGEX# | ||
- Host: localhost | ||
- Host Regex: #HOST_REGEX# | ||
- Scheme: http|https | ||
- Method: GET|HEAD | ||
- Class: Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub | ||
- Defaults: | ||
- `name`: Joseph | ||
- Requirements: | ||
- `name`: [a-z]+ | ||
- Options: | ||
- `compiler_class`: Symfony\Component\Routing\RouteCompiler | ||
- `opt1`: val1 | ||
- `opt2`: val2 | ||
|
||
|
||
route_3 | ||
------- | ||
|
||
- Path: /other/route | ||
- Path Regex: #PATH_REGEX# | ||
- Host: localhost | ||
- Host Regex: #HOST_REGEX# | ||
- Scheme: http|https | ||
- Method: ANY | ||
- Class: Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub | ||
- Defaults: NONE | ||
- Requirements: NO CUSTOM | ||
- Options: | ||
- `compiler_class`: Symfony\Component\Routing\RouteCompiler | ||
- `opt1`: val1 | ||
- `opt2`: val2 | ||
|
7 changes: 7 additions & 0 deletions
7
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_2.txt
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,7 @@ | ||
--------- ---------- ------------ ----------- --------------- | ||
[32m Name [39m [32m Method [39m [32m Scheme [39m [32m Host [39m [32m Path [39m | ||
--------- ---------- ------------ ----------- --------------- | ||
route_1 GET|HEAD http|https localhost /hello/{name} | ||
route_3 ANY http|https localhost /other/route | ||
--------- ---------- ------------ ----------- --------------- | ||
|
33 changes: 33 additions & 0 deletions
33
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_2.xml
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,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<routes> | ||
<route name="route_1" class="Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub"> | ||
<path regex="#PATH_REGEX#">/hello/{name}</path> | ||
<host regex="#HOST_REGEX#">localhost</host> | ||
<scheme>http</scheme> | ||
<scheme>https</scheme> | ||
<method>GET</method> | ||
<method>HEAD</method> | ||
<defaults> | ||
<default key="name">Joseph</default> | ||
</defaults> | ||
<requirements> | ||
<requirement key="name">[a-z]+</requirement> | ||
</requirements> | ||
<options> | ||
<option key="compiler_class">Symfony\Component\Routing\RouteCompiler</option> | ||
<option key="opt1">val1</option> | ||
<option key="opt2">val2</option> | ||
</options> | ||
</route> | ||
<route name="route_3" class="Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub"> | ||
<path regex="#PATH_REGEX#">/other/route</path> | ||
<host regex="#HOST_REGEX#">localhost</host> | ||
<scheme>http</scheme> | ||
<scheme>https</scheme> | ||
<options> | ||
<option key="compiler_class">Symfony\Component\Routing\RouteCompiler</option> | ||
<option key="opt1">val1</option> | ||
<option key="opt2">val2</option> | ||
</options> | ||
</route> | ||
</routes> |
19 changes: 19 additions & 0 deletions
19
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_3.json
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,19 @@ | ||
{ | ||
"route_2": { | ||
"path": "\/name\/add", | ||
"pathRegex": "#PATH_REGEX#", | ||
"host": "localhost", | ||
"hostRegex": "#HOST_REGEX#", | ||
"scheme": "http|https", | ||
"method": "PUT|POST", | ||
"class": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\RouteStub", | ||
"defaults": [], | ||
"requirements": "NO CUSTOM", | ||
"options": { | ||
"compiler_class": "Symfony\\Component\\Routing\\RouteCompiler", | ||
"opt1": "val1", | ||
"opt2": "val2" | ||
}, | ||
"condition": "context.getMethod() in ['GET', 'HEAD', 'POST']" | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_3.md
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,18 @@ | ||
route_2 | ||
------- | ||
|
||
- Path: /name/add | ||
- Path Regex: #PATH_REGEX# | ||
- Host: localhost | ||
- Host Regex: #HOST_REGEX# | ||
- Scheme: http|https | ||
- Method: PUT|POST | ||
- Class: Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub | ||
- Defaults: NONE | ||
- Requirements: NO CUSTOM | ||
- Options: | ||
- `compiler_class`: Symfony\Component\Routing\RouteCompiler | ||
- `opt1`: val1 | ||
- `opt2`: val2 | ||
- Condition: context.getMethod() in ['GET', 'HEAD', 'POST'] | ||
|
6 changes: 6 additions & 0 deletions
6
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_3.txt
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,6 @@ | ||
--------- ---------- ------------ ----------- ----------- | ||
[32m Name [39m [32m Method [39m [32m Scheme [39m [32m Host [39m [32m Path [39m | ||
--------- ---------- ------------ ----------- ----------- | ||
route_2 PUT|POST http|https localhost /name/add | ||
--------- ---------- ------------ ----------- ----------- | ||
|
17 changes: 17 additions & 0 deletions
17
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_3.xml
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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<routes> | ||
<route name="route_2" class="Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub"> | ||
<path regex="#PATH_REGEX#">/name/add</path> | ||
<host regex="#HOST_REGEX#">localhost</host> | ||
<scheme>http</scheme> | ||
<scheme>https</scheme> | ||
<method>PUT</method> | ||
<method>POST</method> | ||
<options> | ||
<option key="compiler_class">Symfony\Component\Routing\RouteCompiler</option> | ||
<option key="opt1">val1</option> | ||
<option key="opt2">val2</option> | ||
</options> | ||
<condition>context.getMethod() in ['GET', 'HEAD', 'POST']</condition> | ||
</route> | ||
</routes> |
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.