Skip to content

Commit

Permalink
[PhpUnitBridge] Ignore deprecations about the annotation mapping driv…
Browse files Browse the repository at this point in the history
…er when it's not possible to move to the attribute driver yet
  • Loading branch information
nicolas-grekas committed Jun 5, 2023
1 parent 1cceec1 commit ce09da1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Symfony/Bridge/PhpUnit/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Symfony\Bridge\PhpUnit\DeprecationErrorHandler;

// Detect if we need to serialize deprecations to a file.
if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true) && $file = getenv('SYMFONY_DEPRECATIONS_SERIALIZE')) {
if (in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && $file = getenv('SYMFONY_DEPRECATIONS_SERIALIZE')) {
DeprecationErrorHandler::collectDeprecations($file);

return;
Expand All @@ -34,6 +34,11 @@

if (class_exists(Deprecation::class)) {
Deprecation::withoutDeduplication();

if (\PHP_VERSION_ID < 80000) {
// Ignore deprecations about the annotation mapping driver when it's not possible to move to the attribute driver yet
Deprecation::ignoreDeprecations('https://github.com/doctrine/orm/issues/10098');
}
}

if (!class_exists(AnnotationRegistry::class, false) && class_exists(AnnotationRegistry::class)) {
Expand Down

0 comments on commit ce09da1

Please sign in to comment.