Skip to content

Commit 5741073

Browse files
bug #33430 [ErrorHandler][Bridge/PhpUnit] display deprecations for not-autoloaded classes (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler][Bridge/PhpUnit] display deprecations for not-autoloaded classes | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 2ba3cc0aba [ErrorHandler][Bridge/PhpUnit] display deprecations for not-autoloaded classes
2 parents 0767d6d + cd52797 commit 5741073

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

DeprecationErrorHandler.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use PHPUnit\Util\ErrorHandler;
1616
use Symfony\Bridge\PhpUnit\DeprecationErrorHandler\Configuration;
1717
use Symfony\Bridge\PhpUnit\DeprecationErrorHandler\Deprecation;
18+
use Symfony\Component\ErrorHandler\DebugClassLoader;
1819

1920
/**
2021
* Catch deprecation notices and print a summary report at the end of the test suite.
@@ -178,6 +179,9 @@ public function shutdown()
178179
return;
179180
}
180181

182+
if (method_exists(DebugClassLoader::class, 'checkClasses')) {
183+
DebugClassLoader::checkClasses();
184+
}
181185
$currErrorHandler = set_error_handler('var_dump');
182186
restore_error_handler();
183187

bin/simple-phpunit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
// Please update when phpunit needs to be reinstalled with fresh deps:
13-
// Cache-Id: 2019-08-09 13:00 UTC
13+
// Cache-Id: 2019-09-02 16:00 UTC
1414

1515
error_reporting(-1);
1616

0 commit comments

Comments
 (0)