Skip to content

[SwiftmailerBridge] Added mailers #8005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

jeremyFreeAgent
Copy link
Contributor

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

Now you can configure several mailers.

Linked to the following PR:

@shouze
Copy link

shouze commented May 10, 2013

Works like a cham with symfony/swiftmailer-bundle#34 😼

@stof
Copy link
Member

stof commented May 10, 2013

@fabpot this logger is highly tied to the bundle. It is not usable standalone as it uses the container to lazy-load the mailer (because of the heavy Swiftmailer initialization). Should we move it to the bundle ?

{
return $this->data['isSpool'];
return $this->data['defaultMailer'] == $name ? true : false;
Copy link
Member

Choose a reason for hiding this comment

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

== already gives you a boolean

@stof
Copy link
Member

stof commented May 14, 2013

@fabpot What do you think about moving the bundle-specific collector to the bundle ?
It would allow us getting this feature merged in SwiftmailerBundle without waiting 2.4 btw.

@jeremyFreeAgent
Copy link
Contributor Author

👍

@shouze
Copy link

shouze commented May 14, 2013

Thanks @stof, @fabpot I think @jeremyFreeAgent can have a window to make the changes ASAP, what's your point ?

@shouze
Copy link

shouze commented May 17, 2013

@fabpot what do you think of @stof idea ?

What do you think about moving the bundle-specific collector to the bundle ? It would allow us getting this feature merged in SwiftmailerBundle without waiting 2.4 btw.

We'll have a long WE and we can work on it if you dare answering.

@shouze
Copy link

shouze commented May 21, 2013

@fabpot What do you think about moving the bundle-specific collector to the bundle ?
It would allow us getting this feature merged in SwiftmailerBundle without waiting 2.4 btw.

@popofr13
Copy link

👍

public function isSpool($name)
{
if ($data = $this->getMailerData($name)) {
return $data['isSpool'];
Copy link
Contributor

Choose a reason for hiding this comment

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

I may be wrong but it seems that the "isSpool" key may not exist as it is set in a if statement and not at the end of the collectmethod as before.

Copy link

Choose a reason for hiding this comment

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

@benja-M-1 you're right but this method depends ont the fact that MailerData is filled or not... so, first it should throw a LogicErrorException if MailerData we're looking for is not set because we have to collect data before.

And then it could test the isSpool key indeed... or at collect time $datacould be initialized with default values.

@jeremyFreeAgent what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes a LogicException is good. Thanks @benja-M-1 and @shouze !

@Koc
Copy link
Contributor

Koc commented May 29, 2013

very good addition

@shouze
Copy link

shouze commented Jun 4, 2013

@fabpot now that sf2.3 is out, would you please give your advice about that?

What do you think about moving the bundle-specific collector to the bundle ? It would allow us getting this feature merged in SwiftmailerBundle without waiting 2.4 btw.

@jeremyFreeAgent
Copy link
Contributor Author

ping @fabpot !

*
* @return array The messages.
*/
public function getMessages($name)
Copy link

Choose a reason for hiding this comment

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

@tkleinhakisa
Copy link

+1

@fabpot
Copy link
Member

fabpot commented Jun 13, 2013

I'd like this collector to work with both the old single mailer and the new mailers, so that we don't have to raise the min version.

@jeremyFreeAgent
Copy link
Contributor Author

Hi,

I've moved the DataCollector in the Bundle with the PR symfony/swiftmailer-bundle#34.

Maybe one day the DataCollector will be removed. So what about removing it in this PR and merge it when winter is coming ?

@fabpot
Copy link
Member

fabpot commented Jul 19, 2013

The best thing to do is to deprecate the collector and mark it to be removed in Symfony 3.0.

@jeremyFreeAgent
Copy link
Contributor Author

I've opened a new PR for that #8520.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants