Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[TwigBridge] Render email once#39733
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
3917970 tob0f4188CompareNyholm commentedJan 6, 2021
@carsonbot do you know who could review this? |
Nyholm commentedJan 6, 2021
@carsonbot please find me a reviewer |
carsonbot commentedJan 6, 2021
@pupaxxo could maybe review this PR? |
Nyholm left a comment
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.
Thank you
Uh oh!
There was an error while loading.Please reload this page.
ajgarlag commentedFeb 5, 2021
I think that this PR is not a feature, but a bug fix and that it should be merged into the 4.4 branch. My problem is that when my app sends a templated email to the async transport, it is rerenderd in an HTTP context and stored with the URLs pointing to the correct hostname, but when the message is consumed from the console I know that it can be fixed by setting the |
jderusse commentedFeb 5, 2021
This issue is addressed by another of my PR 😛#39688 |
ajgarlag commentedFeb 8, 2021
b0f4188 to186ea59Comparejderusse commentedFeb 8, 2021
rebased on 4.4 |
ajgarlag commentedMar 5, 2021
I though this PR would be merged before releasing version4.4.20. Can I help to get it merged soon? Thanks |
derrabus commentedMar 5, 2021
Thank you Jérémy. |
PhilETaylor commentedMar 11, 2021
This has caused a b/c break :-( details incoming... |
PhilETaylor commentedMar 11, 2021
Serialization of 'Closure' is not allowed#40445 |
Uh oh!
There was an error while loading.Please reload this page.
When
\Symfony\Component\Mailer\Mailersend an email via the Bus (async) it dispatches anMessageEvent, then the consumer call the\Symfony\Component\Mailer\Transport\AbstractTransport::sendmethod which also dispatches anMessageEvent.This event is listened by
\Symfony\Bridge\Twig\Mime\BodyRenderer::renderwhich rendered twice an email.I'm not sure why the event is send twice, and if we could safely remove one of them (or maybe deprecating the
MessageEvent, in favor ofSendMessageEvent+AsyncMessageEvent)This PR store a flag in the Message to avoid rendering it twice.