Skip to content

Commit

Permalink
bug #50567 [PhpUnitBridge] Ignore deprecations about the annotation m…
Browse files Browse the repository at this point in the history
…apping driver when it's not possible to move to the attribute driver yet (nicolas-grekas)

This PR was merged into the 6.3 branch.

Discussion
----------

[PhpUnitBridge] Ignore deprecations about the annotation mapping driver when it's not possible to move to the attribute driver yet

| Q             | A
| ------------- | ---
| Branch?       | 6.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

ce09da1 [PhpUnitBridge] Ignore deprecations about the annotation mapping driver when it's not possible to move to the attribute driver yet
  • Loading branch information
nicolas-grekas committed Jun 5, 2023
2 parents ac88b34 + ce09da1 commit 1693989
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Symfony/Bridge/PhpUnit/bootstrap.php
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 1693989

Please sign in to comment.