Skip to content

Commit 7b519dc

Browse files
committed
Attempt to suppress deprecation warnings in main CLI process
The STDERR of the main process should be stable, but PHP deprecations (and their flawed design) make it really challenging to operate with them dependant on PHP defaults. We therefore force them to be off. Deprecations affecting us on PHP 8.5, right now: * revoltphp/event-loop#114 * revoltphp/event-loop#110 * symfony/symfony#61772
1 parent 906e838 commit 7b519dc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/roave-backward-compatibility-check.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,15 @@
3434
use Symfony\Component\Console\Input\ArgvInput;
3535
use Symfony\Component\Console\Output\ConsoleOutput;
3636

37+
use function error_reporting;
3738
use function file_exists;
3839

40+
use const E_ALL;
41+
use const E_DEPRECATED;
42+
3943
(static function (): void {
44+
error_reporting(E_ALL & ~E_DEPRECATED);
45+
4046
(static function (): void {
4147
$autoloaderLocations = [
4248
__DIR__ . '/../vendor/autoload.php', // Installed by cloning the project and running `composer install`

0 commit comments

Comments
 (0)