Skip to content
This repository was archived by the owner on Feb 6, 2022. It is now read-only.

Updated the styles of the SwiftMailer commands #115

Closed
wants to merge 8 commits into from

Conversation

javiereguiluz
Copy link
Member

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

swiftmailer_1

swiftmailer_2

swiftmailer_3

swiftmailer_4

@stof
Copy link
Member

stof commented Sep 29, 2015

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));
Copy link
Member

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.

@javiereguiluz
Copy link
Member Author

@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>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why thic changed?

Copy link
Member

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.

@fabpot
Copy link
Member

fabpot commented Oct 9, 2016

@javiereguiluz Can you update this PR? I'd like to drop support for 2.3 now that it's not maintained anymore. Thanks.

@javiereguiluz javiereguiluz force-pushed the update_commands branch 3 times, most recently from 253c87f to b5db3cf Compare October 9, 2016 15:29
@fabpot
Copy link
Member

fabpot commented Oct 9, 2016

@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);
Copy link
Member

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.

@fabpot
Copy link
Member

fabpot commented Oct 19, 2016

@javiereguiluz Can you have a look at the broken tests? Apparently, there is one var $sent that is used but not defined. Thanks.

@fabpot
Copy link
Member

fabpot commented Oct 19, 2016

Thank you @javiereguiluz.

@fabpot fabpot closed this in efa96cb Oct 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants