Skip to content

Commit a6fce7e

Browse files
Merge branch '4.4'
* 4.4: fix merge Fix inconsistent return points. pass translation parameters to the trans filter [Mime] fixed wrong mimetype [ProxyManagerBridge] Polyfill for unmaintained version [HttpClient] Declare `$active` first to prevent weird issue Remove deprecated assertContains [HttpClient] fix tests SCA: dropped unused mocks, duplicate import and a function alias usage Added correct plural for box -> boxes [Config] fix test Fix remaining tests fix getName() when transport is null [Console] Check for ErrorHandler classes Improve fa (persian) translation
2 parents b1724a0 + c76ad45 commit a6fce7e

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

AbstractTransport.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ public function __construct(EventDispatcherInterface $dispatcher = null, LoggerI
3939
$this->logger = $logger ?: new NullLogger();
4040
}
4141

42-
abstract public function getName(): string;
43-
4442
/**
4543
* Sets the maximum number of messages to send per second (0 to disable).
4644
*/

SendmailTransport.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ public function send(RawMessage $message, SmtpEnvelope $envelope = null): ?SentM
7575

7676
public function getName(): string
7777
{
78-
return $this->transport->getName();
78+
if ($this->transport) {
79+
return $this->transport->getName();
80+
}
81+
82+
return 'smtp://sendmail';
7983
}
8084

8185
protected function doSend(SentMessage $message): void

Transport/AbstractTransport.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ public function __construct(EventDispatcherInterface $dispatcher = null, LoggerI
3939
$this->logger = $logger ?: new NullLogger();
4040
}
4141

42-
abstract public function getName(): string;
43-
4442
/**
4543
* Sets the maximum number of messages to send per second (0 to disable).
4644
*/

Transport/SendmailTransport.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ public function send(RawMessage $message, SmtpEnvelope $envelope = null): ?SentM
7575

7676
public function getName(): string
7777
{
78-
return $this->transport->getName();
78+
if ($this->transport) {
79+
return $this->transport->getName();
80+
}
81+
82+
return 'smtp://sendmail';
7983
}
8084

8185
protected function doSend(SentMessage $message): void

0 commit comments

Comments
 (0)