Skip to content

Commit 356e4c1

Browse files
committed
Correctly use VALUE_REQUIRED for InputOption
The options are still optional, but when provided they now require a value
1 parent dee061f commit 356e4c1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/HtaccessCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ public function __construct(
2828
protected function configure(): void
2929
{
3030
$this->addArgument('url', InputArgument::OPTIONAL, 'The request url to test your .htaccess file with');
31-
$this->addOption('referrer', 'r', InputOption::VALUE_OPTIONAL, 'The referrer header, used as HTTP_REFERER in apache');
32-
$this->addOption('server-name', 's', InputOption::VALUE_OPTIONAL, 'The configured server name, used as SERVER_NAME in apache');
33-
$this->addOption('http-user-agent', null, InputOption::VALUE_OPTIONAL, 'The User Agent header, used as HTTP_USER_AGENT in apache');
34-
$this->addOption('expected-url', 'e', InputOption::VALUE_OPTIONAL, 'When configured, errors when the output url does not equal this url');
31+
$this->addOption('referrer', 'r', InputOption::VALUE_REQUIRED, 'The referrer header, used as HTTP_REFERER in apache');
32+
$this->addOption('server-name', 's', InputOption::VALUE_REQUIRED, 'The configured server name, used as SERVER_NAME in apache');
33+
$this->addOption('http-user-agent', null, InputOption::VALUE_REQUIRED, 'The User Agent header, used as HTTP_USER_AGENT in apache');
34+
$this->addOption('expected-url', 'e', InputOption::VALUE_REQUIRED, 'When configured, errors when the output url does not equal this url');
3535
$this->addOption('share', null, InputOption::VALUE_NONE, 'When passed, you\'ll receive a share url for your test run');
36-
$this->addOption('url-list', 'l', InputOption::VALUE_OPTIONAL, 'Location of the yaml file containing your url list');
37-
$this->addOption('path', 'p', InputOption::VALUE_OPTIONAL, 'Path to the working directory you want to test in.');
36+
$this->addOption('url-list', 'l', InputOption::VALUE_REQUIRED, 'Location of the yaml file containing your url list');
37+
$this->addOption('path', 'p', InputOption::VALUE_REQUIRED, 'Path to the working directory you want to test in.');
3838
}
3939

4040
protected function execute(InputInterface $input, OutputInterface $output): int

0 commit comments

Comments
 (0)