Please sign in to comment.
feature #29159 [Messenger] collect all stamps added on Envelope as co…
…llections (nicolas-grekas) This PR was merged into the 4.2-dev branch. Discussion ---------- [Messenger] collect all stamps added on Envelope as collections | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | no | New feature? | yes | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | #29156 | License | MIT | Doc PR | - Late small BC break for Messenger: * `Envelope::all()` takes a new optional `$stampFqcn` argument and returns the stamps for the specified FQCN, or all stamps by their class name * `Envelope::get()` has been renamed `Envelope::last()` This fixes the current behavior where we replace any previous stamp with the same type, which is unexpected to me as it silently loses data and more importantly blocks interesting use cases we're going to need in the near future. Basically, that's the same as HTTP headers being allowed to exist several times: most of them make no sense as collections, but some are really useful as collections. Commits ------- 2e98859 [Messenger] collect all stamps added on Envelope as collections
- Loading branch information...
Showing with 43 additions and 44 deletions.
- +2 −0 src/Symfony/Component/Messenger/CHANGELOG.md
- +10 −6 src/Symfony/Component/Messenger/Envelope.php
- +1 −1 src/Symfony/Component/Messenger/Middleware/SendMessageMiddleware.php
- +1 −1 src/Symfony/Component/Messenger/Middleware/ValidationMiddleware.php
- +6 −6 src/Symfony/Component/Messenger/Tests/EnvelopeTest.php
- +1 −1 src/Symfony/Component/Messenger/Tests/TraceableMessageBusTest.php
- +6 −17 src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php
- +2 −1 src/Symfony/Component/Messenger/Tests/WorkerTest.php
- +14 −11 src/Symfony/Component/Messenger/Transport/Serialization/Serializer.php