Skip to content

Commit e06b0f0

Browse files
committed
bug #32700 [Messenger] Flatten collection of stamps collected by the traceable middleware (ogizanagi)
This PR was merged into the 4.2 branch. Discussion ---------- [Messenger] Flatten collection of stamps collected by the traceable middleware | Q | A | ------------- | --- | Branch? | 4.2 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | N/A <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | N/A ### before ![Capture d’écran 2019-07-24 à 10 04 07](https://user-images.githubusercontent.com/2211145/61776018-65a12680-adfa-11e9-9efd-bd6682a0a296.png) ![Capture d’écran 2019-07-24 à 09 57 59](https://user-images.githubusercontent.com/2211145/61775695-b1070500-adf9-11e9-9bab-ac740f296684.png) ### after ![Capture d’écran 2019-07-24 à 09 57 37](https://user-images.githubusercontent.com/2211145/61775694-b1070500-adf9-11e9-95bf-14dc4d63c2ae.png) Not sure how it qualifies, but I assume this wasn't entirely intentional when introducing the new `Envelope::all()` behavior in #29159. Note it'll affect #32680 as well once merged. Commits ------- 015fca7 [Messenger] Flatten collection of stamps collected by the traceable middleware
2 parents 6693104 + 015fca7 commit e06b0f0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Messenger/Tests/TraceableMessageBusTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testItTracesDispatchWithEnvelope()
5656
$this->assertCount(1, $tracedMessages = $traceableBus->getDispatchedMessages());
5757
$this->assertArraySubset([
5858
'message' => $message,
59-
'stamps' => [[$stamp]],
59+
'stamps' => [$stamp],
6060
'caller' => [
6161
'name' => 'TraceableMessageBusTest.php',
6262
'file' => __FILE__,

src/Symfony/Component/Messenger/TraceableMessageBus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function dispatch($message): Envelope
3333
{
3434
$envelope = $message instanceof Envelope ? $message : new Envelope($message);
3535
$context = [
36-
'stamps' => array_values($envelope->all()),
36+
'stamps' => array_merge([], ...array_values($envelope->all())),
3737
'message' => $envelope->getMessage(),
3838
'caller' => $this->getCaller(),
3939
'callTime' => microtime(true),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy