-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
warning about using swiftmail with file spool and lazy loading #7104
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
Conversation
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.
I like this a lot! Thanks @nykopol.
I find it very easy to understand, but I've left some minor comments.
When you use the filesystem for spooling, messages are serialized with | ||
the message class name. If the service is lazy loaded this class name | ||
change on every cache clear. So if you send a mail, then you clear the | ||
cache, the message will not be unserialisable. |
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.
unserialisable
-> unserializable
(because we use American English instead of British English)
class ``Swift_Message_<someRandomCharacters>`` doesn't exist (anymore). | ||
|
||
The solutions are either to use the memory spool or to load the | ||
swiftmailer without ``lazy`` option. |
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.
Something looks missing here:
... to load the swiftmailer without ...
"the swiftmailer" ... library? service?
And another question: about the lazy
option. It's not explained in http://symfony.com/doc/current/reference/configuration/swiftmailer.html, so this may confuse some readers.
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.
Still a valid comment, I'm trying to figure out here which service I should change to adjust the lazy
option.
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.
(as using the container debugger, there seems not to be a swiftmailer
service registered)
|
||
.. caution:: | ||
|
||
When you use the filesystem for spooling, messages are serialized with |
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.
The explanation is very clear to me ... but maybe we'd need at the beginning a short phrase explaining the Swift_Message_<someRandomCharacters>
thing that you mention later. Otherwise, this may be confusing:
messages are serialized with the message class name.
Which class name? I don't create classes to send messages! You don't create them ... but SwiftMailer does that for you.
@javiereguiluz I updated about every thing. Hope that is more easy to understand now. |
Thank you @nykopol. |
…ading (nykopol, javiereguiluz) This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #7104). Discussion ---------- warning about using swiftmail with file spool and lazy loading PR to fix #5596 Commits ------- 0a19f77 Fixed minor syntax issues and typos ef3ab27 more precision on class name, and lazy service f97db93 add warning about the limitation on using swiftmail with file spool and lazy loading
* 2.7: [#6961] add additional config formats [#7104] minor typo fix Fixed minor syntax issues and typos more precision on class name, and lazy service add warning about the limitation on using swiftmail with file spool and lazy loading Removed the proposed note and updated the title Added note on ODM id notation being different [#7099] remove trailing whitespaces Clarify Process::wait() callback behaviour Minor text fix - wrong submit button label (Forms) [Doctrine] Slave/Master configuration options Fix broken link Fix typo Add missing parenthesis for methods and a few minor tweaks [Doctrine] Exception note about functions with named managers
* 2.8: [#6961] add additional config formats [#7104] minor typo fix Fixed minor syntax issues and typos more precision on class name, and lazy service add warning about the limitation on using swiftmail with file spool and lazy loading Removed the proposed note and updated the title Added note on ODM id notation being different [#7099] remove trailing whitespaces Clarify Process::wait() callback behaviour Minor text fix - wrong submit button label (Forms) [Doctrine] Slave/Master configuration options Fix broken link Fix typo Add missing parenthesis for methods and a few minor tweaks [Doctrine] Exception note about functions with named managers
* 3.1: [#6961] add additional config formats [#7104] minor typo fix Fixed minor syntax issues and typos more precision on class name, and lazy service add warning about the limitation on using swiftmail with file spool and lazy loading Removed the proposed note and updated the title Added note on ODM id notation being different [#7099] remove trailing whitespaces Clarify Process::wait() callback behaviour Remove AssetsHelper from the templating component Minor text fix - wrong submit button label (Forms) [Doctrine] Slave/Master configuration options Fix broken link Fix typo Add missing parenthesis for methods and a few minor tweaks Update input.rst [Profiler] Fix rst typo [Doctrine] Exception note about functions with named managers
PR to fix #5596