Skip to content

Commit

Permalink
Fix runtime check of PHP version
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Jan 26, 2021
1 parent be542fb commit 37a9611
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion php-cs-fixer
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ if (defined('HHVM_VERSION_ID')) {
} else {
exit(1);
}
} elseif (!defined('PHP_VERSION_ID') || \PHP_VERSION_ID < 50600 || \PHP_VERSION_ID >= 80100) {
} elseif (
!defined('PHP_VERSION_ID')
|| \PHP_VERSION_ID === 80000
|| \PHP_VERSION_ID < 50600
|| \PHP_VERSION_ID >= 80100
) {
fwrite(STDERR, "PHP needs to be a minimum version of PHP 5.6.0 and maximum version of PHP 8.0.*.\n");
fwrite(STDERR, 'Current PHP version: '.PHP_VERSION.".\n");

Expand Down

0 comments on commit 37a9611

Please sign in to comment.