-
-
Notifications
You must be signed in to change notification settings - Fork 152
Updated the styles of the SwiftMailer commands #115
Conversation
javiereguiluz
commented
Sep 29, 2015
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | - |
License | MIT |
Doc PR | - |
Dropping support for Symfony 2.3 seems a bad idea. Core bundles need to keep support for the LTS. And it would be great to avoid having to maintain 2 versions of the bundle in parallel. |
$transport = $mailer->getTransport(); | ||
$spool = $this->getContainer()->getParameter(sprintf('swiftmailer.mailer.%s.spool.enabled', $name)) ? 'YES' : 'NO'; | ||
$delivery = $this->getContainer()->getParameter(sprintf('swiftmailer.mailer.%s.delivery.enabled', $name)) ? 'YES' : 'NO'; | ||
$singleAddress = $this->getContainer()->getParameter(sprintf('swiftmailer.mailer.%s.single_address', $name)); | ||
|
||
$output->writeln($this->getHelper('formatter')->formatSection('swiftmailer', sprintf('Mailer "%s"', $name))); | ||
$output->title(sprintf('Configuration of the Mailer "%s"', $name)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this triggers a fatal error if $output
is null, which is allowed in your method signature.
@stof I agree with you. Let's block this pull request for now and let's merge it on May 2016 when Symfony 2.3 will die. |
@@ -39,7 +40,7 @@ protected function configure() | |||
->setHelp(<<<EOF | |||
The <info>swiftmailer:spool:send</info> command sends all emails from the spool. | |||
|
|||
<info>php %command.full_name% --message-limit=10 --time-limit=10 --recover-timeout=900 --mailer=default</info> | |||
<info>php app/console swiftmailer:spool:send --message-limit=10 --time-limit=10 --recover-timeout=900 --mailer=default</info> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why thic changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 for that btw. Using the placeholders is better, as it avoids having to maintain the command name in multiple places. Thus, the console file is not in app
anymore in the Symfony 3 structure, meaning that your updated help message is wrong on Symfony 3.
@javiereguiluz Can you update this PR? I'd like to drop support for 2.3 now that it's not maintained anymore. Thanks. |
253c87f
to
b5db3cf
Compare
@javiereguiluz You were faster than I expected :) I've just bumped version to 2.4 which drops support for 2.3. I've also added a CHANGELOG. Can you rebase to again and add an entry in the new CHANGELOG? |
$name = $input->getArgument('name'); | ||
|
||
if ($name) { | ||
$this->outputMailer($output, $name); | ||
$this->outputMailer($stdout, $name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable does not exist. Did you forget to rename $output
in the method signature? Not sure I understand why you renamed $output
to $stdout
anyway.
d302b32
to
3adba0b
Compare
@javiereguiluz Can you have a look at the broken tests? Apparently, there is one var |
Thank you @javiereguiluz. |