From e3f17f9d30024881671e08fa2aea9c0cf4d5d5bb Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Fri, 21 Mar 2014 17:46:08 +0100 Subject: [PATCH] add scheme option to router:match command --- .../FrameworkBundle/Command/RouterMatchCommand.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php index 69ba04af4c..55ff6a73de 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php @@ -52,15 +52,16 @@ class RouterMatchCommand extends ContainerAwareCommand ->setDefinition(array( new InputArgument('path_info', InputArgument::REQUIRED, 'A path info'), new InputOption('method', null, InputOption::VALUE_REQUIRED, 'Sets the HTTP method'), - new InputOption('host', null, InputOption::VALUE_REQUIRED, 'Sets the HTTP host'), + new InputOption('scheme', null, InputOption::VALUE_REQUIRED, 'Sets the URI scheme (usually http or https)'), + new InputOption('host', null, InputOption::VALUE_REQUIRED, 'Sets the URI host'), )) ->setDescription('Helps debug routes by simulating a path info match') ->setHelp(<<%command.name% simulates a path info match: +The %command.name% shows which routes match a given request and which don't and for what reason: php %command.full_name% /foo or - php %command.full_name% /foo --method POST --host symfony.com + php %command.full_name% /foo --method POST --scheme https --host symfony.com --verbose EOF ) @@ -77,6 +78,9 @@ EOF if (null !== $method = $input->getOption('method')) { $context->setMethod($method); } + if (null !== $scheme = $input->getOption('scheme')) { + $context->setScheme($scheme); + } if (null !== $host = $input->getOption('host')) { $context->setHost($host); }