[BUGFIX] Use proper argument for options in SendEmailCommand 43/59643/2
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 5 Feb 2019 12:09:33 +0000 (13:09 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Wed, 6 Feb 2019 23:04:53 +0000 (00:04 +0100)
InputOption::VALUE_REQUIRED must be used instead of InputArgument::REQUIRED.

Resolves: #87648
Releases: master, 9.5
Change-Id: Ifd727ec26af0e1e2237e9ca5ae480b9ed2fd5b6f
Reviewed-on: https://review.typo3.org/59643
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Tested-by: Josef Glatz <josef.glatz@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/core/Classes/Command/SendEmailCommand.php

index 498df1a..53af870 100644 (file)
@@ -16,8 +16,8 @@ namespace TYPO3\CMS\Core\Command;
  */
 
 use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Output\OutputInterface;
 use Symfony\Component\Console\Style\SymfonyStyle;
 use TYPO3\CMS\Core\Mail\Mailer;
@@ -39,9 +39,9 @@ class SendEmailCommand extends Command
     {
         $this
             ->setDescription('Sends emails from the spool')
-            ->addOption('message-limit', null, InputArgument::REQUIRED, 'The maximum number of messages to send.')
-            ->addOption('time-limit', null, InputArgument::REQUIRED, 'The time limit for sending messages (in seconds).')
-            ->addOption('recover-timeout', null, InputArgument::REQUIRED, 'The timeout for recovering messages that have taken too long to send (in seconds).');
+            ->addOption('message-limit', null, InputOption::VALUE_REQUIRED, 'The maximum number of messages to send.')
+            ->addOption('time-limit', null, InputOption::VALUE_REQUIRED, 'The time limit for sending messages (in seconds).')
+            ->addOption('recover-timeout', null, InputOption::VALUE_REQUIRED, 'The timeout for recovering messages that have taken too long to send (in seconds).');
     }
 
     /**