From 7d55e0c065bd2581aac3054a46d2195065654b6b Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Sat, 12 Sep 2020 23:46:40 +0200 Subject: [PATCH] Internal classes are not legacy. --- .../Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php index ed1528f6c9..911d37495e 100644 --- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php +++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler/Deprecation.php @@ -143,6 +143,10 @@ class Deprecation public function isLegacy() { $class = $this->originatingClass(); + if ((new \ReflectionClass($class))->isInternal()) { + return false; + } + $method = $this->originatingMethod(); return 0 === strpos($method, 'testLegacy')