Skip to content

Commit

Permalink
Exclude warnings from being reported on PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jul 16, 2020
1 parent 74fc8d8 commit 92b116a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/phpstan
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ use PHPStan\Command\DumpDependenciesCommand;
use PHPStan\Command\WorkerCommand;

(function () {
error_reporting(E_ALL);
if (PHP_VERSION_ID >= 80000) {
error_reporting(E_ALL & ~E_WARNING);
} else {
error_reporting(E_ALL);
}
ini_set('display_errors', 'stderr');
gc_disable(); // performance boost

Expand Down

0 comments on commit 92b116a

Please sign in to comment.