Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
wants to merge 3 commits into from

Conversation

nykopol
Copy link
Contributor

@nykopol nykopol commented Oct 31, 2016

PR to fix #5596

Copy link
Member

@javiereguiluz javiereguiluz left a 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.
Copy link
Member

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.
Copy link
Member

@javiereguiluz javiereguiluz Oct 31, 2016

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.

Copy link
Contributor

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.

Copy link
Contributor

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

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.

@nykopol
Copy link
Contributor Author

nykopol commented Oct 31, 2016

@javiereguiluz I updated about every thing. Hope that is more easy to understand now.

@javiereguiluz
Copy link
Member

@nykopol thanks! Your PR is great ... but in d608213 I've committed some minor syntax issues and typos so you don't have to do that.

👍

status: reviewed

@xabbuh
Copy link
Member

xabbuh commented Nov 5, 2016

Thank you @nykopol.

xabbuh added a commit that referenced this pull request Nov 5, 2016
…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
xabbuh added a commit that referenced this pull request Nov 5, 2016
@xabbuh xabbuh closed this Nov 5, 2016
xabbuh added a commit that referenced this pull request Nov 5, 2016
* 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
xabbuh added a commit that referenced this pull request Nov 5, 2016
* 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
xabbuh added a commit that referenced this pull request Nov 5, 2016
* 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
@nykopol nykopol deleted the fix_5596 branch November 6, 2016 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable lazy loaded swift messages when using the filesystem spool
5 participants