Skip to content
This repository was archived by the owner on Feb 6, 2022. It is now read-only.

Commit b15bf6d

Browse files
mklewitzfabpot
authored andcommitted
Fixing check for swiftmailer in EmailSenderListener
1 parent 6b72355 commit b15bf6d

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
**Swiftmailer will stop being maintained at the end of November 2021.**
2+
3+
Please, move to Symfony Mailer at your earliest convenience.
4+
Symfony Mailer is the next evolution of Swiftmailer.
5+
It provides the same features with support for modern PHP code and support for third-party providers.
6+
See https://symfony.com/doc/current/mailer.html for more information.
7+
18
# 3.5.0
29

310
* Fix support for "stream_options" in configuration

DependencyInjection/Compiler/EnsureNoHotPathPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class EnsureNoHotPathPass extends AbstractRecursivePass
2020
{
2121
protected function processValue($value, $isRoot = false)
2222
{
23-
if ($value instanceof Definition && 0 === strpos($value->getClass(), 'Swift_')) {
23+
if ($value instanceof Definition && null !== ($class = $value->getClass()) && 0 === strpos($class, 'Swift_')) {
2424
$value->clearTag('container.hot_path');
2525
}
2626

EventListener/EmailSenderListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function onException()
4545

4646
public function onTerminate()
4747
{
48-
if (!$this->container->has('mailer') || $this->wasExceptionThrown) {
48+
if ((!$this->container->has('mailer') && !$this->container->has('swiftmailer.mailer.default')) || $this->wasExceptionThrown) {
4949
return;
5050
}
5151
$mailers = array_keys($this->container->getParameter('swiftmailer.mailers'));

Resources/doc/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Installation
22
============
33

4+
**Swiftmailer will stop being maintained at the end of November 2021.**
5+
6+
Please, move to `Symfony Mailer <https://symfony.com/doc/current/mailer.html>`_ at your earliest convenience.
7+
`Symfony Mailer <https://symfony.com/doc/current/mailer.html>`_ is the next evolution of Swiftmailer.
8+
It provides the same features with support for modern PHP code and support for third-party providers.
9+
410
Step 1: Download the Bundle
511
---------------------------
612

0 commit comments

Comments
 (0)