Skip to content

Commit 38ee5c2

Browse files
Merge pull request #31 from MacPaw/fix/PLATECO-7191-reset-on-exception
Fix/plateco 7191 reset on exception
2 parents 1db7f52 + c6c1fc2 commit 38ee5c2

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

.github/workflows/static-analysis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
run: composer install --no-progress --no-interaction --prefer-dist
3737

3838
- name: Run script
39-
run: vendor/bin/phpstan analyse
39+
run: vendor/bin/phpstan analyse --configuration=./phpstan.neon
4040

4141
composer-validate:
4242
name: Composer validate

phpstan.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,3 @@ parameters:
33
paths:
44
- src
55
- tests
6-
ignoreErrors:
7-
-
8-
message: '~Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::children\(\).~'
9-
count: 1
10-
path: ./src/DependencyInjection

src/Messenger/Middleware/BaggageSchemaMiddleware.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ public function handle(Envelope $envelope, StackInterface $stack): Envelope
3434
->setBaggage($stamp->baggage === null ? null : $this->baggageCodec->decode($stamp->baggage));
3535
}
3636

37-
$result = $stack->next()->handle($envelope, $stack);
38-
39-
$this->baggageSchemaResolver->reset();
37+
try {
38+
$result = $stack->next()->handle($envelope, $stack);
39+
} finally {
40+
$this->baggageSchemaResolver->reset();
41+
}
4042

4143
return $result;
4244
}

0 commit comments

Comments
 (0)