Skip to content

Commit 2396dac

Browse files
Merge branch '4.4'
* 4.4: (24 commits) [Console] Command::execute() should always return int - deprecate returning null [FrameworkBundle] Fix wrong returned status code in ConfigDebugCommand [AnnotationCacheWarmer] add RedirectController to annotation cache [WebProfilerBundle] Try to display the most useful panel by default Add note about deprecating the XmlEncoder::TYPE_CASE_ATTRIBUTES constant in the upgrade guide fix merge [DI] add tests loading calls with returns-clone [DI] dont mandate a class on inline services with a factory Fixed Redis Sentinel usage when only one Sentinel specified [EventDispatcher] Added tests for aliased events. Sync Twig templateExists behaviors Fix the :only-of-type pseudo class selector Deprecate the XmlEncoder::TYPE_CASE_ATTRIBUTES constant [Mailer] Tweak some code [Serializer] Add CsvEncoder tests for PHP 7.4 Copy phpunit.xsd to a predictable path [WebserverBundle] Remove duplicated deprecation message remove duplicated test [Security/Http] fix parsing X509 emailAddress [FrameworkBundle] conflict with VarDumper < 4.4 ...
2 parents 401889b + 3352304 commit 2396dac

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Transport/RoundRobinTransport.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class RoundRobinTransport implements TransportInterface
3535
public function __construct(array $transports, int $retryPeriod = 60)
3636
{
3737
if (!$transports) {
38-
throw new TransportException(__CLASS__.' must have at least one transport configured.');
38+
throw new TransportException(sprintf('"%s" must have at least one transport configured.', static::class));
3939
}
4040

4141
$this->transports = $transports;
@@ -58,9 +58,7 @@ public function send(RawMessage $message, Envelope $envelope = null): ?SentMessa
5858

5959
public function __toString(): string
6060
{
61-
return $this->getNameSymbol().'('.implode(' ', array_map(function (TransportInterface $transport) {
62-
return (string) $transport;
63-
}, $this->transports)).')';
61+
return $this->getNameSymbol().'('.implode(' ', array_map('strval', $this->transports)).')';
6462
}
6563

6664
/**

Transport/Transports.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* @author Fabien Potencier <fabien@symfony.com>
2323
*/
24-
class Transports implements TransportInterface
24+
final class Transports implements TransportInterface
2525
{
2626
private $transports;
2727
private $default;
@@ -64,6 +64,6 @@ public function send(RawMessage $message, Envelope $envelope = null): ?SentMessa
6464

6565
public function __toString(): string
6666
{
67-
return 'all';
67+
return '['.implode(',', array_keys($this->transports)).']';
6868
}
6969
}

0 commit comments

Comments
 (0)