Skip to content

Commit 40d77ce

Browse files
committed
feature #28947 [Messenger] remove classifying sub-namespaces in favor of semantic ones (nicolas-grekas)
This PR was merged into the 4.2-dev branch. Discussion ---------- [Messenger] remove classifying sub-namespaces in favor of semantic ones | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - While working on the component, I found it hard to discover the meaning of the `Asynchronous` and `Enhancers` sub-namespaces. Now that I know the component better, I understand they're only classifying namespaces with no specific technical semantics. I'd like to remove them to make the component easier to discover. This PR introduces a few new semantic sub-namespaces instead. From the changelog: * Classes in the `Middleware\Enhancers` sub-namespace have been moved to the `Middleware` one * Classes in the `Asynchronous\Routing` sub-namespace have been moved to the `Transport\Sender\Locator` sub-namespace * The `Asynchronous/Middleware/SendMessageMiddleware` class has been moved to the `Middleware` namespace * `SenderInterface` and `ChainSender` classes have been moved to the `Transport\Sender` sub-namespace * `ReceiverInterface` and its implementations have been moved to the `Transport\Receiver` sub-namespace Commits ------- 16afb5e2b4 [Messenger] remove classifying sub-namespaces in favor of semantic ones
2 parents 7ddd8fb + 4fbebbb commit 40d77ce

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
6969
use Symfony\Component\Messenger\MessageBus;
7070
use Symfony\Component\Messenger\MessageBusInterface;
71-
use Symfony\Component\Messenger\Transport\ChainSender;
71+
use Symfony\Component\Messenger\Transport\Sender\ChainSender;
7272
use Symfony\Component\Messenger\Transport\TransportFactoryInterface;
7373
use Symfony\Component\Messenger\Transport\TransportInterface;
7474
use Symfony\Component\PropertyAccess\PropertyAccessor;

Resources/config/messenger.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
<defaults public="false" />
99

1010
<!-- Asynchronous -->
11-
<service id="messenger.asynchronous.routing.sender_locator" class="Symfony\Component\Messenger\Asynchronous\Routing\ContainerSenderLocator">
11+
<service id="messenger.asynchronous.routing.sender_locator" class="Symfony\Component\Messenger\Transport\Sender\Locator\ContainerSenderLocator">
1212
<argument type="service" id="messenger.sender_locator" />
1313
<argument type="collection" /> <!-- Message to sender ID mapping -->
1414
</service>
15-
<service id="messenger.middleware.route_messages" class="Symfony\Component\Messenger\Asynchronous\Middleware\SendMessageMiddleware">
15+
<service id="messenger.middleware.route_messages" class="Symfony\Component\Messenger\Middleware\SendMessageMiddleware">
1616
<argument type="service" id="messenger.asynchronous.routing.sender_locator" />
1717
<argument type="collection" /> <!-- Message to send and handle mapping -->
1818
</service>

0 commit comments

Comments
 (0)