-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
symfony/symfony-docs
#12989Description
Symfony version(s) affected: 4.3.7, 5.0.3
Description
Changing order of array_merge
parameters made overriding type
header in AMQP impossible and hardcoded it to FQCN of message, which is not nice for interoperability.
How to reproduce
Before this change, overriding header for envelope was simple like that:
/** @var Symfony\Component\Messenger\Envelope $envelope */
$envelope = $envelope->with(
new AmqpStamp(
null, AMQP_NOPARAM, [
'headers' => [
'type' => 'CUSTOM_MESSAGE_TYPE',
],
]
)
);
Possible Solution
Parameters order should be reverted, as it is BC change, or HeaderStamp PR should be merged to reenable overriding headers - it is must-have for sharing messages between codebases.