8000 [Messenger] fix transport_name option not passing validation · symfony/symfony@48408e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 48408e3

Browse files
committed
[Messenger] fix transport_name option not passing validation
the doctrine transport connection validates the options and complains about this option, so we remove it before. the purpose is for custom transport factories anyway
1 parent f805fe3 commit 48408e3

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/Symfony/Component/Messenger/Transport/AmqpExt/AmqpTransportFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class AmqpTransportFactory implements TransportFactoryInterface
2424
{
2525
public function createTransport(string $dsn, array $options, SerializerInterface $serializer): TransportInterface
2626
{
27+
unset($options['transport_name']);
28+
2729
return new AmqpTransport(Connection::fromDsn($dsn, $options), $serializer);
2830
}
2931

src/Symfony/Component/Messenger/Transport/Doctrine/DoctrineTransportFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function __construct(RegistryInterface $registry)
3333

3434
public function createTransport(string $dsn, array $options, SerializerInterface $serializer): TransportInterface
3535
{
36+
unset($options['transport_name']);
3637
$configuration = Connection::buildConfiguration($dsn, $options);
3738

3839
try {

src/Symfony/Component/Messenger/Transport/RedisExt/RedisTransportFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class RedisTransportFactory implements TransportFactoryInterface
2525
{
2626
public function createTransport(string $dsn, array $options, SerializerInterface $serializer): TransportInterface
2727
{
28+
unset($options['transport_name']);
29+
2830
return new RedisTransport(Connection::fromDsn($dsn, $options), $serializer);
2931
}
3032

0 commit comments

Comments
 (0)
0