mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 16:55:38 +08:00
Add extension version and env check method (#458)
This commit is contained in:
@@ -18,7 +18,7 @@ class opcache extends Extension
|
||||
*/
|
||||
public function validate(): void
|
||||
{
|
||||
if ($this->builder->getPHPVersionID() < 80000) {
|
||||
if ($this->builder->getPHPVersionID() < 80000 && getenv('SPC_SKIP_PHP_VERSION_CHECK') !== 'yes') {
|
||||
throw new WrongUsageException('Statically compiled PHP with Zend Opcache only available for PHP >= 8.0 !');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user