@@ -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
6566EOF
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