Project

General

Profile

Actions

Bug #87648

closed

SendEmailCommand with wrong Parameter

Added by Sascha Grötzner about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
CLI
Target version:
-
Start date:
2019-02-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Using swiftmail:spool:send with parameters produces an error "option does not accept a value"

./typo3/sysext/core/bin/typo3 swiftmailer:spool:send --message-limit=2
The "--message-limit" option does not accept a value.  
swiftmailer:spool:send [--message-limit] [--time-limit] [--recover-timeout]

->the class SendEmailCommand::configure uses wrong parameter:
is:

use Symfony\Component\Console\Input\InputArgument;
...
protected function configure()
    {
        $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).');
    }

should be: (InputArgument -> InputOption)

use Symfony\Component\Console\Input\InputOption;
...
protected function configure()
    {
        $this
            ->setDescription('Sends emails from the spool')
            ->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).');
    }

Actions #1

Updated by Gerrit Code Review about 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59643

Actions #2

Updated by Gerrit Code Review about 5 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59655

Actions #3

Updated by Georg Ringer about 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF