Skip to content

DI-tags documentation should contain 'swiftmailer.default.plugin' tag instead of 'swiftmailer.plugin' to work #3201

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

Merged
merged 4 commits into from
Nov 28, 2013

Conversation

mgrinko
Copy link
Contributor

@mgrinko mgrinko commented Nov 18, 2013

SwiftMailer plugin works only if its service defined with tag 'swiftmailer.default.plugin' and does not work with tag 'swiftmailer.plugin' specified in documentation

  SwiftMailer plugin works only if its service defined with tag 'swiftmailer.default.plugin' and does not work with tag 'swiftmailer.plugin' specified in documentation
@wouterj
Copy link
Member

wouterj commented Nov 18, 2013

Hmm, I'm not sure how we should document this. If the tag is swiftmailer.default.plugin, the plugin will be registered on the mailer with name default. If the tag is swiftmailer.other_mailer.plugin it'll be registered on the mailer with name other_mailer.

So, just saying swiftmailer.default.plugin doesn't work. Maybe swiftmailer.mailer_name.plugin in the table and some text saying that mailer_name is the name of the mailer will solve the issue?

@stof
Copy link
Member

stof commented Nov 18, 2013

actually, having different tags for the different mailers was a mistake IMO (and I said it on the PR but it was merged without the change). Thus, it was breaking BC. I'm considering changing it back.

@mgrinko
Copy link
Contributor Author

mgrinko commented Nov 18, 2013

I have just found out that current tag does not work and found the solution for my situation.
I don't know common solution. So I am only asking to fix this in documentation.

@makasim
Copy link

makasim commented Nov 18, 2013

The doc could have a notice\warning that describes what default means in the tag name.

@wouterj
Copy link
Member

wouterj commented Nov 18, 2013

@stof yeah, I was also thinking why they didn't create an attribute to determine the mailer. I'm +1 for that (but that will break BC again... :(

@mgrinko you're fix is correct. The only thing is that it only works when your mailer is called 'default'. That will confuse other people when they named their mailer to something else. Can you please add a note, saying that default is the name of the mailer? Something like this:

.. note::

    ``default`` in this tag is the name of the mailer. You should change it to the
    name of your mailer in order to use this tag.

@mgrinko
Copy link
Contributor Author

mgrinko commented Nov 18, 2013

@wouterj I added your explanation as a note.

@@ -833,14 +833,19 @@ and :class:`Symfony\\Component\\Serializer\\Normalizer\\DenormalizerInterface`.

For more details, see :doc:`/cookbook/serializer`.

swiftmailer.plugin
swiftmailer.default.plugin
------------------
Copy link
Member

Choose a reason for hiding this comment

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

this tag line should be as long as the headline itself

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@wouterj
Copy link
Member

wouterj commented Nov 18, 2013

thank you @mgrinko !

@wouterj
Copy link
Member

wouterj commented Nov 18, 2013

👍

weaverryan added a commit that referenced this pull request Nov 28, 2013
DI-tags documentation should contain 'swiftmailer.default.plugin' tag instead of 'swiftmailer.plugin' to work
@weaverryan weaverryan merged commit 781f89a into symfony:2.3 Nov 28, 2013
@weaverryan
Copy link
Member

Great work everyone! I agree that the way this feature was implemented was a little silly and the BC break didn't make it back to the docs. But, all good now!

Thanks!

@mgrinko mgrinko deleted the patch-1 branch November 28, 2013 21:13
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.

5 participants