Skip to content

Commit

Permalink
bug #5466 Fix runtime check of PHP version (keradus)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.18 branch.

Discussion
----------

Fix runtime check of PHP version

closes #5465

Commits
-------

37a9611 Fix runtime check of PHP version
  • Loading branch information
keradus committed Jan 26, 2021
2 parents 4a142ed + 37a9611 commit a7fc912
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 a7fc912

Please sign in to comment.