Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e3f17f9

Browse filesBrowse files
committed
add scheme option to router:match command
1 parent 6586eaa commit e3f17f9
Copy full SHA for e3f17f9

File tree

Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,16 @@ protected function configure()
5252
->setDefinition(array(
5353
new InputArgument('path_info', InputArgument::REQUIRED, 'A path info'),
5454
new InputOption('method', null, InputOption::VALUE_REQUIRED, 'Sets the HTTP method'),
55-
new InputOption('host', null, InputOption::VALUE_REQUIRED, 'Sets the HTTP host'),
55+
new InputOption('scheme', null, InputOption::VALUE_REQUIRED, 'Sets the URI scheme (usually http or https)'),
56+
new InputOption('host', null, InputOption::VALUE_REQUIRED, 'Sets the URI host'),
5657
))
5758
->setDescription('Helps debug routes by simulating a path info match')
5859
->setHelp(<<<EOF
59-
The <info>%command.name%</info> simulates a path info match:
60+
The <info>%command.name%</info> shows which routes match a given request and which don't and for what reason:
6061
6162
<info>php %command.full_name% /foo</info>
6263
or
63-
<info>php %command.full_name% /foo --method POST --host symfony.com</info>
64+
<info>php %command.full_name% /foo --method POST --scheme https --host symfony.com --verbose</info>
6465
6566
EOF
6667
)
@@ -77,6 +78,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
7778
if (null !== $method = $input->getOption('method')) {
7879
$context->setMethod($method);
7980
}
81+
if (null !== $scheme = $input->getOption('scheme')) {
82+
$context->setScheme($scheme);
83+
}
8084
if (null !== $host = $input->getOption('host')) {
8185
$context->setHost($host);
8286
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.