Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #31710 [DX][Messenger] Improve error message when routing to an…
… invalid transport (Koc) This PR was merged into the 4.4 branch. Discussion ---------- [DX][Messenger] Improve error message when routing to an invalid transport | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #31613 | License | MIT | Doc PR | - Commits ------- 7909092 [Messenger] Improve error message when routing to an invalid transport (closes #31613)
- Loading branch information
Showing
11 changed files
with
89 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...workBundle/Tests/DependencyInjection/Fixtures/php/messenger_routing_invalid_transport.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
$container->loadFromExtension('framework', [ | ||
'serializer' => true, | ||
'messenger' => [ | ||
'serializer' => [ | ||
'default_serializer' => 'messenger.transport.symfony_serializer', | ||
], | ||
'routing' => [ | ||
'Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\DummyMessage' => 'invalid', | ||
], | ||
'transports' => [ | ||
'amqp' => 'amqp://localhost/%2f/messages', | ||
], | ||
], | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...workBundle/Tests/DependencyInjection/Fixtures/xml/messenger_routing_invalid_transport.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:framework="http://symfony.com/schema/dic/symfony" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd | ||
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd"> | ||
|
||
<framework:config> | ||
<framework:serializer enabled="true" /> | ||
<framework:messenger> | ||
<framework:serializer default-serializer="messenger.transport.symfony_serializer" /> | ||
<framework:routing message-class="Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\DummyMessage"> | ||
<framework:sender service="invalid" /> | ||
</framework:routing> | ||
<framework:routing message-class="Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\SecondMessage"> | ||
<framework:sender service="amqp" /> | ||
<framework:sender service="audit" /> | ||
</framework:routing> | ||
<framework:transport name="amqp" dsn="amqp://localhost/%2f/messages" /> | ||
</framework:messenger> | ||
</framework:config> | ||
</container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...workBundle/Tests/DependencyInjection/Fixtures/yml/messenger_routing_invalid_transport.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
framework: | ||
serializer: true | ||
messenger: | ||
serializer: | ||
default_serializer: messenger.transport.symfony_serializer | ||
routing: | ||
'Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\DummyMessage': invalid | ||
transports: | ||
amqp: 'amqp://localhost/%2f/messages' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters