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')