Skip to content

Commit 3a50ec2

Browse files
committed
Fix FailureEnvelope metadata calculation
1 parent 4877f3e commit 3a50ec2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

phpbench.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema":"./vendor/phpbench/phpbench/phpbench.schema.json",
33
"runner.bootstrap": "vendor/autoload.php",
44
"runner.path": "tests/Benchmark",
5-
"runner.revs": 100000,
5+
"runner.revs": 10000,
66
"runner.iterations": 5,
77
"runner.warmup": 5
88
}

src/Middleware/FailureHandling/FailureEnvelope.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
final class FailureEnvelope implements EnvelopeInterface
1212
{
13-
use EnvelopeTrait;
13+
use EnvelopeTrait {
14+
getMetadata as getMetadataParent;
15+
}
1416

1517
public const FAILURE_META_KEY = 'failure-meta';
1618

@@ -28,7 +30,7 @@ public static function fromMessage(MessageInterface $message): self
2830

2931
public function getMetadata(): array
3032
{
31-
$meta = $this->message->getMetadata();
33+
$meta = $this->getMetadataParent();
3234
$meta[self::FAILURE_META_KEY] = array_merge($meta[self::FAILURE_META_KEY] ?? [], $this->meta);
3335

3436
return $meta;

0 commit comments

Comments
 (0)