only in patch2: unchanged: --- a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php +++ b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php @@ -21,6 +21,16 @@ */ protected function deprecationEndTest($test, $time) { /** @var \PHPUnit\Framework\Test $test */ + $util_test_class = class_exists('PHPUnit_Util_Test') ? 'PHPUnit_Util_Test' : 'PHPUnit\Util\Test'; + $method = $test->getName(); + if (strpos($method, 'testLegacy') === 0 + || strpos($method, 'provideLegacy') === 0 + || strpos($method, 'getLegacy') === 0 + || strpos(get_class($test), '\Legacy') + || in_array('legacy', $util_test_class::getGroups(get_class($test), $method), TRUE)) { + // This is a legacy test don't skip deprecations. + return; + } // Need to edit the file of deprecations. if ($file = getenv('SYMFONY_DEPRECATIONS_SERIALIZE')) { $deprecations = file_get_contents($file);