From bd7a1d2999b8b74dc2d7ea350e1e18291e546ab9 Mon Sep 17 00:00:00 2001 From: mamazu <14860264+mamazu@users.noreply.github.com> Date: Fri, 14 Feb 2025 19:20:21 +0100 Subject: [PATCH] Only show relevant columns in debug:router --- .../Console/Descriptor/TextDescriptor.php | 86 +++++++++++++++---- .../Console/Descriptor/ObjectsProvider.php | 27 +++++- .../Descriptor/empty_route_collection.json | 2 + .../Descriptor/empty_route_collection.md | 0 .../Descriptor/empty_route_collection.txt | 4 + .../Descriptor/empty_route_collection.xml | 3 + .../Tests/Fixtures/Descriptor/route_1.txt | 2 +- .../Fixtures/Descriptor/route_1_link.txt | 2 +- .../Tests/Fixtures/Descriptor/route_2.txt | 2 +- .../Fixtures/Descriptor/route_2_link.txt | 2 +- .../Descriptor/route_collection_1.json | 1 + .../Fixtures/Descriptor/route_collection_1.md | 3 +- .../Descriptor/route_collection_1.txt | 4 +- .../Descriptor/route_collection_1.xml | 1 + .../Descriptor/route_collection_2.txt | 4 +- .../Descriptor/route_collection_3.txt | 2 +- .../Descriptor/route_with_generic_host.json | 18 ++++ .../Descriptor/route_with_generic_host.md | 15 ++++ .../Descriptor/route_with_generic_host.txt | 6 ++ .../Descriptor/route_with_generic_host.xml | 14 +++ .../Descriptor/route_with_generic_scheme.json | 18 ++++ .../Descriptor/route_with_generic_scheme.md | 15 ++++ .../Descriptor/route_with_generic_scheme.txt | 6 ++ .../Descriptor/route_with_generic_scheme.xml | 13 +++ 24 files changed, 220 insertions(+), 30 deletions(-) create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.json create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.md create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.txt create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.xml create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.json create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.md create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.txt create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.xml create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.json create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.md create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.txt create mode 100644 src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.xml diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index a5b31b1860560..4535b8eadb338 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -38,6 +38,17 @@ */ class TextDescriptor extends Descriptor { + private const VERB_COLORS = [ + 'ANY' => 'default', + 'GET' => 'blue', + 'HEAD' => 'magenta', + 'OPTIONS' => 'blue', + 'POST' => 'green', + 'PUT' => 'yellow', + 'PATCH' => 'yellow', + 'DELETE' => 'red', + ]; + public function __construct( private ?FileLinkFormatter $fileLinkFormatter = null, ) { @@ -45,40 +56,64 @@ public function __construct( protected function describeRouteCollection(RouteCollection $routes, array $options = []): void { - $showControllers = isset($options['show_controllers']) && $options['show_controllers']; - - $tableHeaders = ['Name', 'Method', 'Scheme', 'Host', 'Path']; - if ($showControllers) { - $tableHeaders[] = 'Controller'; - } - - if ($showAliases = $options['show_aliases'] ?? false) { - $tableHeaders[] = 'Aliases'; - } + $showAliases = $options['show_aliases'] ?? false; + $showControllers = $options['show_controllers'] ?? false; $tableRows = []; + $shouldShowScheme = false; + $shouldShowHost = false; foreach ($routes->all() as $name => $route) { $controller = $route->getDefault('_controller'); + $scheme = $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY'; + $shouldShowScheme = $shouldShowScheme || 'ANY' !== $scheme; + + $host = '' !== $route->getHost() ? $route->getHost() : 'ANY'; + $shouldShowHost = $shouldShowHost || 'ANY' !== $host; + $row = [ - $name, - $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY', - $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY', - '' !== $route->getHost() ? $route->getHost() : 'ANY', - $this->formatControllerLink($controller, $route->getPath(), $options['container'] ?? null), + 'Name' => $name, + 'Methods' => $this->formatMethods($route->getMethods()), + 'Scheme' => $scheme, + 'Host' => $host, + 'Path' => $route->getPath(), ]; if ($showControllers) { - $row[] = $controller ? $this->formatControllerLink($controller, $this->formatCallable($controller), $options['container'] ?? null) : ''; + $row['Controller'] = $controller ? $this->formatControllerLink($controller, $this->formatCallable($controller), $options['container'] ?? null) : ''; } if ($showAliases) { - $row[] = implode('|', ($reverseAliases ??= $this->getReverseAliases($routes))[$name] ?? []); + $row['Aliases'] = implode('|', ($this->getReverseAliases($routes))[$name] ?? []); } $tableRows[] = $row; } + $tableHeaders = ['Name', 'Method']; + + if ($shouldShowScheme) { + $tableHeaders[] = 'Scheme'; + } else { + array_walk($tableRows, function (&$row) { unset($row['Scheme']); }); + } + + if ($shouldShowHost) { + $tableHeaders[] = 'Host'; + } else { + array_walk($tableRows, function (&$row) { unset($row['Host']); }); + } + + $tableHeaders[] = 'Path'; + + if ($showControllers) { + $tableHeaders[] = 'Controller'; + } + + if ($showAliases) { + $tableHeaders[] = 'Aliases'; + } + if (isset($options['output'])) { $options['output']->table($tableHeaders, $tableRows); } else { @@ -103,7 +138,7 @@ protected function describeRoute(Route $route, array $options = []): void ['Host', '' !== $route->getHost() ? $route->getHost() : 'ANY'], ['Host Regex', '' !== $route->getHost() ? $route->compile()->getHostRegex() : ''], ['Scheme', $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY'], - ['Method', $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY'], + ['Method', $this->formatMethods($route->getMethods())], ['Requirements', $route->getRequirements() ? $this->formatRouterConfig($route->getRequirements()) : 'NO CUSTOM'], ['Class', $route::class], ['Defaults', $this->formatRouterConfig($defaults)], @@ -576,6 +611,21 @@ private function formatRouterConfig(array $config): string return trim($configAsString); } + /** + * @param array $methods + */ + private function formatMethods(array $methods): string + { + if (count($methods) === 0) { + $methods = ['ANY']; + } + + return implode('|', array_map( + fn (string $method): string => sprintf('%s', self::VERB_COLORS[$method] ?? 'default', $method), + $methods + )); + } + /** * @param (callable():ContainerBuilder)|null $getContainer */ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php index 8eb1c438601c2..07c66e9c87523 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php @@ -34,7 +34,32 @@ public static function getRouteCollections() $collection1->add($name, $route); } - return ['route_collection_1' => $collection1]; + $routesWithGenericHost = new RouteCollection(); + $routesWithGenericHost->add('some_route', new RouteStub( + '/some-route', + ['_controller' => 'Controller'], + [], + [], + null, + ['https'], + )); + + $routesWithGenericScheme = new RouteCollection(); + $routesWithGenericScheme->add('some_route_with_host', new RouteStub( + '/some-route', + ['_controller' => 'strpos'], + [], + [], + 'symfony.com', + [], + )); + + return [ + 'empty_route_collection' => new RouteCollection(), + 'route_collection_1' => $collection1, + 'route_with_generic_host' => $routesWithGenericHost, + 'route_with_generic_scheme' => $routesWithGenericScheme, + ]; } public static function getRouteCollectionsByHttpMethod(): array diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.json new file mode 100644 index 0000000000000..7dd4387521924 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.json @@ -0,0 +1,2 @@ +[] + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.md new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.txt new file mode 100644 index 0000000000000..de24cefb89204 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.txt @@ -0,0 +1,4 @@ + ------ -------- ------ +  Name   Method   Path  + ------ -------- ------ + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.xml new file mode 100644 index 0000000000000..ea7517e162a61 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/empty_route_collection.xml @@ -0,0 +1,3 @@ + + + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.txt index 9814273b7a221..bb70cea61d94b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.txt @@ -7,7 +7,7 @@ | Host | localhost | | Host Regex | #HOST_REGEX# | | Scheme | http|https | -| Method | GET|HEAD | +| Method | GET|HEAD | | Requirements | name: [a-z]+ | | Class | Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub | | Defaults | name: Joseph | diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1_link.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1_link.txt index ad7a4c8c844fb..f91cf38806213 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1_link.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1_link.txt @@ -7,7 +7,7 @@ | Host | localhost | | Host Regex | #HOST_REGEX# | | Scheme | http|https | -| Method | GET|HEAD | +| Method | GET|HEAD | | Requirements | name: [a-z]+ | | Class | Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub | | Defaults | _controller: ]8;;myeditor://open?file=[:file:]&line=58\Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\MyController::__invoke()]8;;\ | diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.txt index 533409d402add..7bdbb83a01965 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.txt @@ -7,7 +7,7 @@ | Host | localhost | | Host Regex | #HOST_REGEX# | | Scheme | http|https | -| Method | PUT|POST | +| Method | PUT|POST | | Requirements | NO CUSTOM | | Class | Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub | | Defaults | NONE | diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2_link.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2_link.txt index 8e3fe4ca7d65f..1d9276e34d0db 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2_link.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2_link.txt @@ -7,7 +7,7 @@ | Host | localhost | | Host Regex | #HOST_REGEX# | | Scheme | http|https | -| Method | PUT|POST | +| Method | PUT|POST | | Requirements | NO CUSTOM | | Class | Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub | | Defaults | _controller: ]8;;myeditor://open?file=[:file:]&line=58\Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\MyController::__invoke()]8;;\ | diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json index 200108a166aac..b5d584c957462 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.json @@ -37,3 +37,4 @@ "condition": "context.getMethod() in ['GET', 'HEAD', 'POST']" } } + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.md index 432001f0247fa..64b38953bd5b7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.md @@ -34,5 +34,4 @@ route_2 - `compiler_class`: Symfony\Component\Routing\RouteCompiler - `opt1`: val1 - `opt2`: val2 -- Condition: context.getMethod() in ['GET', 'HEAD', 'POST'] - +- Condition: context.getMethod() in ['GET', 'HEAD', 'POST'] \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt index 9d06562328908..b787a2d4b9705 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt @@ -1,7 +1,7 @@ --------- ---------- ------------ ----------- ---------------  Name   Method   Scheme   Host   Path  --------- ---------- ------------ ----------- --------------- - route_1 GET|HEAD http|https localhost /hello/{name} - route_2 PUT|POST http|https localhost /name/add + route_1 GET|HEAD http|https localhost /hello/{name} + route_2 PUT|POST http|https localhost /name/add --------- ---------- ------------ ----------- --------------- diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml index 6a07e059649c8..c36826d869d48 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.xml @@ -34,3 +34,4 @@ context.getMethod() in ['GET', 'HEAD', 'POST'] + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_2.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_2.txt index a9f9ee21b7497..e511a2857354f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_2.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_2.txt @@ -1,7 +1,7 @@ --------- ---------- ------------ ----------- ---------------  Name   Method   Scheme   Host   Path  --------- ---------- ------------ ----------- --------------- - route_1 GET|HEAD http|https localhost /hello/{name} - route_3 ANY http|https localhost /other/route + route_1 GET|HEAD http|https localhost /hello/{name} + route_3 ANY http|https localhost /other/route --------- ---------- ------------ ----------- --------------- diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_3.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_3.txt index 8822b3c40793a..1d89756d24703 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_3.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_3.txt @@ -1,6 +1,6 @@ --------- ---------- ------------ ----------- -----------  Name   Method   Scheme   Host   Path  --------- ---------- ------------ ----------- ----------- - route_2 PUT|POST http|https localhost /name/add + route_2 PUT|POST http|https localhost /name/add --------- ---------- ------------ ----------- ----------- diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.json new file mode 100644 index 0000000000000..bc002e61d9ef6 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.json @@ -0,0 +1,18 @@ +{ + "some_route": { + "path": "\/some-route", + "pathRegex": "#PATH_REGEX#", + "host": "ANY", + "hostRegex": "", + "scheme": "https", + "method": "ANY", + "class": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\RouteStub", + "defaults": { + "_controller": "Controller" + }, + "requirements": "NO CUSTOM", + "options": { + "compiler_class": "Symfony\\Component\\Routing\\RouteCompiler" + } + } +} diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.md new file mode 100644 index 0000000000000..41466a1646f4a --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.md @@ -0,0 +1,15 @@ +some_route +---------- + +- Path: /some-route +- Path Regex: #PATH_REGEX# +- Host: ANY +- Host Regex: +- Scheme: https +- Method: ANY +- Class: Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub +- Defaults: + - `_controller`: Controller +- Requirements: NO CUSTOM +- Options: + - `compiler_class`: Symfony\Component\Routing\RouteCompiler \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.txt new file mode 100644 index 0000000000000..6c34fc464c5ef --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.txt @@ -0,0 +1,6 @@ + ------------ -------- -------- ------------- +  Name   Method   Scheme   Path  + ------------ -------- -------- ------------- + some_route ANY https /some-route + ------------ -------- -------- ------------- + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.xml new file mode 100644 index 0000000000000..de9930fc5cc2e --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_host.xml @@ -0,0 +1,14 @@ + + + + /some-route + https + + Controller + + + + + + + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.json b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.json new file mode 100644 index 0000000000000..811c077732f8c --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.json @@ -0,0 +1,18 @@ +{ + "some_route_with_host": { + "path": "\/some-route", + "pathRegex": "#PATH_REGEX#", + "host": "symfony.com", + "hostRegex": "#HOST_REGEX#", + "scheme": "ANY", + "method": "ANY", + "class": "Symfony\\Bundle\\FrameworkBundle\\Tests\\Console\\Descriptor\\RouteStub", + "defaults": { + "_controller": "strpos" + }, + "requirements": "NO CUSTOM", + "options": { + "compiler_class": "Symfony\\Component\\Routing\\RouteCompiler" + } + } +} diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.md new file mode 100644 index 0000000000000..8a8bad6ea9fd5 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.md @@ -0,0 +1,15 @@ +some_route_with_host +-------------------- + +- Path: /some-route +- Path Regex: #PATH_REGEX# +- Host: symfony.com +- Host Regex: #HOST_REGEX# +- Scheme: ANY +- Method: ANY +- Class: Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\RouteStub +- Defaults: + - `_controller`: strpos +- Requirements: NO CUSTOM +- Options: + - `compiler_class`: Symfony\Component\Routing\RouteCompiler diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.txt new file mode 100644 index 0000000000000..cb83e325a81e2 --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.txt @@ -0,0 +1,6 @@ + ---------------------- -------- ------------- ------------- +  Name   Method   Host   Path  + ---------------------- -------- ------------- ------------- + some_route_with_host ANY symfony.com /some-route + ---------------------- -------- ------------- ------------- + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.xml new file mode 100644 index 0000000000000..fe7d8da8d9a4f --- /dev/null +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_with_generic_scheme.xml @@ -0,0 +1,13 @@ + + + + /some-route + symfony.com + + strpos + + + + + + pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy