8000 minor #32624 [Messenger] fix transport_name option not passing valida… · symfony/symfony@950306a · GitHub
[go: up one dir, main page]

Skip to content

Commit 950306a

Browse files
committed
minor #32624 [Messenger] fix transport_name option not passing validation (Tobion)
This PR was merged into the 4.3 branch. Discussion ---------- [Messenger] fix transport_name option not passing validation | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | 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 | #32567 | License | MIT | Doc PR | the doctrine transport connection validates the options and complains about this option, so we remove it before. the other transports will probably add the validation as well: #32575 the purpose of the option is for custom transport factories anyway. Commits ------- 48408e3 [Messenger] fix transport_name option not passing validation
2 parents f805fe3 + 48408e3 commit 950306a

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/Transpo 8000 rt/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