Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3ea4901

Browse filesBrowse files
committed
bug #29837 Fix SwiftMailerHandler to support Monolog's latest reset functionality (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
2 parents b06967e + ada2d83 commit 3ea4901
Copy full SHA for 3ea4901

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed

‎src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ protected function send($content, array $records)
5959
}
6060
}
6161

62+
/**
63+
* {@inheritdoc}
64+
*/
65+
public function reset()
66+
{
67+
$this->flushMemorySpool();
68+
}
69+
6270
/**
6371
* Flushes the mail queue if a memory spool is used.
6472
*/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.