1
0
Fork 0

Platform Check: Add a special case for `zend-opcache`.

Ref #8946

The platform-check feature maps `ext-X` to `extension_loaded('X')` calls.
While most of the extensions can be tested this way, the `zend-opcache`
extension requires `zend opcache` to be probed instead of the `zend-opcache`
name.

This commit adds a special case for `zend-opcache` to use the correct name
in `extension_loaded()` calls in generated `platform_check.php` file.
pull/8950/head
Ayesh Karunaratne 2020-06-04 23:05:22 +07:00
parent 627afe78ca
commit 71ddc487fe
No known key found for this signature in database
GPG Key ID: 2CA18B2097A7429A
1 changed files with 4 additions and 0 deletions

View File

@ -640,6 +640,10 @@ EOF;
} }
} }
if ($match[1] === 'zend-opcache') {
$match[1] = 'zend opcache';
}
$extension = var_export($match[1], true); $extension = var_export($match[1], true);
if ($match[1] === 'pcntl' || $match[1] === 'readline') { if ($match[1] === 'pcntl' || $match[1] === 'readline') {
$requiredExtensions[$extension] = "PHP_SAPI !== 'cli' || extension_loaded($extension) || \$missingExtensions[] = $extension;\n"; $requiredExtensions[$extension] = "PHP_SAPI !== 'cli' || extension_loaded($extension) || \$missingExtensions[] = $extension;\n";