I have a Symfony command controller in a TYPO3 extension which has arguments. The arguments are set using for example $this->addArgument('myArgument', InputArgument::OPTIONAL, 'My argument', 'default');
and fetched using $input->getArgument('myArgument')
. The command is executed using vendor/bin/typo3 myextension:mycommand myargument
.
This works fine usually, however one argument is used to set a relative date using strtotime
, like -1 week
. This causes an error: The "-1" option does not exist.
The command used for this is vendor/bin/typo3 myextension:mycommand "-1 week"
.
Is there a different way to input the argument or a way to escape it? I've already tried "\-1 week"