Skip to content

Commit

Permalink
Merge branch '5.4' into 6.0
Browse files Browse the repository at this point in the history
* 5.4:
  [DependencyInjection] Add `SubscribedService` attribute, deprecate current `ServiceSubscriberTrait` usage
  Use try/finally to restore error handlers
  Allow serializer default context configuration
  • Loading branch information
nicolas-grekas committed Oct 27, 2021
2 parents 82a21e3 + 0a12248 commit 3d44fd8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Tests/OptionsResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,13 @@ public function testDeprecationMessages(\Closure $configureOptions, array $optio
});
$e = error_reporting(0);

$configureOptions($this->resolver);
$this->resolver->resolve($options);

error_reporting($e);
restore_error_handler();
try {
$configureOptions($this->resolver);
$this->resolver->resolve($options);
} finally {
error_reporting($e);
restore_error_handler();
}

$lastError = error_get_last();
unset($lastError['file'], $lastError['line']);
Expand Down

0 comments on commit 3d44fd8

Please sign in to comment.