Skip to content

Commit 592715f

Browse files
Merge branch '5.4' into 6.0
* 5.4: [DependencyInjection] Add `SubscribedService` attribute, deprecate current `ServiceSubscriberTrait` usage Use try/finally to restore error handlers Allow serializer default context configuration
2 parents d1876a3 + a8aa21b commit 592715f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Tests/EventListener/DebugHandlersListenerTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ public function testConfigure()
4747
try {
4848
$listener->configure();
4949
} catch (\Exception $exception) {
50+
} finally {
51+
restore_exception_handler();
52+
restore_error_handler();
5053
}
51-
restore_exception_handler();
52-
restore_error_handler();
5354

5455
if (null !== $exception) {
5556
throw $exception;
@@ -113,9 +114,10 @@ public function testConsoleEvent()
113114
try {
114115
$dispatcher->dispatch($event, ConsoleEvents::COMMAND);
115116
} catch (\Exception $exception) {
117+
} finally {
118+
restore_exception_handler();
119+
restore_error_handler();
116120
}
117-
restore_exception_handler();
118-
restore_error_handler();
119121

120122
if (null !== $exception) {
121123
throw $exception;

0 commit comments

Comments
 (0)