Skip to content

Commit 9633e6e

Browse files
committed
feature #32916 [Mailer] Add a name to the transports (fabpot)
This PR was merged into the 4.4 branch. Discussion ---------- [Mailer] Add a name to the transports | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | yes | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | n/a | License | MIT | Doc PR | n/a Having a name for Transports helps identify them (useful for instance in the profiler when one uses several mailers). Commits ------- 2412dfe71f [Mailer] added a name to the transport
2 parents bc81695 + 333089a commit 9633e6e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Tests/Functional/MailerTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ public function __construct(EventDispatcherInterface $eventDispatcher, LoggerInt
4242
$this->onDoSend = $onDoSend;
4343
}
4444

45+
public function getName(): string
46+
{
47+
return 'dummy://local';
48+
}
49+
4550
protected function doSend(SentMessage $message): void
4651
{
4752
$onDoSend = $this->onDoSend;

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"symfony/dom-crawler": "<4.3",
7575
"symfony/form": "<4.3",
7676
"symfony/lock": "<4.4",
77+
"symfony/mailer": "<4.4",
7778
"symfony/messenger": "<4.3",
7879
"symfony/property-info": "<3.4",
7980
"symfony/serializer": "<4.2",

0 commit comments

Comments
 (0)