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

Fix SwiftMailerHandler to support Monolog's latest reset functionality #29837

Merged
merged 1 commit into from Jan 13, 2019

Conversation

Projects
None yet
4 participants
@Seldaek
Copy link
Member

Seldaek commented Jan 10, 2019

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

Monolog 1.24 added the ResettableInterface which is meant to support resetting handlers. Reset should also flush as if the request was ending, and it can be used for long running workers for example in between each job that is processed. Due to SwiftMailer's spool however the emails in case of errors are right now only sent at the very end of the worker's lifetime.

For older Monolog versions, this will be ignored, and is thus harmless.

@fabpot

fabpot approved these changes Jan 13, 2019

@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Jan 13, 2019

Thank you @Seldaek.

@fabpot fabpot merged commit ada2d83 into symfony:3.4 Jan 13, 2019

1 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Jan 13, 2019

bug #29837 Fix SwiftMailerHandler to support Monolog's latest reset f…
…unctionality (Seldaek)

This PR was merged into the 3.4 branch.

Discussion
----------

Fix SwiftMailerHandler to support Monolog's latest reset functionality

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Monolog 1.24 added the ResettableInterface which is meant to support resetting handlers. Reset should also flush as if the request was ending, and it can be used for long running workers for example in between each job that is processed. Due to SwiftMailer's spool however the emails in case of errors are right now only sent at the very end of the worker's lifetime.

For older Monolog versions, this will be ignored, and is thus harmless.

Commits
-------

ada2d83 Fix SwiftMailerHandler to support Monolog's latest reset functionality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment