minor #30659 [Messenger] Add a BC layer for the ConsumeMessagesCommand
arguments (sroze)
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Messenger] Add a BC layer for the `ConsumeMessagesCommand` arguments
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no - removing some
| Deprecations? | yes (files already updated in previous PR)
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
| Doc PR | ø
Instead of conflicting `symfony/messenger` with an old `symfony/framework-bundle`, let's add a simple BC layer.
Commits
-------
21235310e3
Add a BC layer for the `ConsumeMessagesCommand` arguments
This commit is contained in:
commit
468bca8faa
@ -8,7 +8,7 @@ CHANGELOG
|
|||||||
and `BusNameStamp` were added, which allow you to add a bus identifier
|
and `BusNameStamp` were added, which allow you to add a bus identifier
|
||||||
to the `Envelope` then find the correct bus when receiving from
|
to the `Envelope` then find the correct bus when receiving from
|
||||||
the transport. See `ConsumeMessagesCommand`.
|
the transport. See `ConsumeMessagesCommand`.
|
||||||
* An optional `ConsumeMessagesCommand` constructor argument was removed.
|
* The optional `$busNames` constructor argument of the class `ConsumeMessagesCommand` was removed.
|
||||||
* [BC BREAK] 2 new methods were added to `ReceiverInterface`:
|
* [BC BREAK] 2 new methods were added to `ReceiverInterface`:
|
||||||
`ack()` and `reject()`.
|
`ack()` and `reject()`.
|
||||||
* [BC BREAK] Error handling was moved from the receivers into
|
* [BC BREAK] Error handling was moved from the receivers into
|
||||||
|
@ -43,8 +43,14 @@ class ConsumeMessagesCommand extends Command
|
|||||||
private $retryStrategyLocator;
|
private $retryStrategyLocator;
|
||||||
private $eventDispatcher;
|
private $eventDispatcher;
|
||||||
|
|
||||||
public function __construct(ContainerInterface $busLocator, ContainerInterface $receiverLocator, LoggerInterface $logger = null, array $receiverNames = [], ContainerInterface $retryStrategyLocator = null, EventDispatcherInterface $eventDispatcher = null)
|
public function __construct(ContainerInterface $busLocator, ContainerInterface $receiverLocator, LoggerInterface $logger = null, array $receiverNames = [], /* ContainerInterface */ $retryStrategyLocator = null, EventDispatcherInterface $eventDispatcher = null)
|
||||||
{
|
{
|
||||||
|
if (\is_array($retryStrategyLocator)) {
|
||||||
|
@trigger_error(sprintf('The 5th argument of the class "%s" should be a retry-strategy locator, an array of bus names as a value is deprecated since Symfony 4.3.', __CLASS__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
|
$retryStrategyLocator = null;
|
||||||
|
}
|
||||||
|
|
||||||
$this->busLocator = $busLocator;
|
$this->busLocator = $busLocator;
|
||||||
$this->receiverLocator = $receiverLocator;
|
$this->receiverLocator = $receiverLocator;
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
|
Reference in New Issue
Block a user