Skip to content

Commit cd52797

Browse files
[ErrorHandler][Bridge/PhpUnit] display deprecations for not-autoloaded classes
1 parent dfe140a commit cd52797

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)