mirror of
https://github.com/mlocati/docker-php-extension-installer
synced 2025-05-09 16:42:41 +00:00
Remove not passing extensions, test fewer extensions, fix installed extensions check
This commit is contained in:
parent
6fbd39d2fa
commit
817156a26f
3 changed files with 40 additions and 19 deletions
21
scripts/check-installed-extension.php
Normal file
21
scripts/check-installed-extension.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
$extension = isset($argv[1]) ? trim($argv[1]) : '';
|
||||
|
||||
if ($extension === '') {
|
||||
fprintf(STDERR, "Missing module handle.\n");
|
||||
exit(1);
|
||||
}
|
||||
$nameMap = array(
|
||||
'opcache' => 'Zend OPcache',
|
||||
);
|
||||
$extensionLowerCase = strtolower($extension);
|
||||
if (isset($nameMap[$extensionLowerCase])) {
|
||||
$extension = $nameMap[$extensionLowerCase];
|
||||
}
|
||||
|
||||
if (extension_loaded($extension)) {
|
||||
exit(0);
|
||||
}
|
||||
fprintf(STDERR, sprintf("Extension not loaded: %s\n", $extension));
|
||||
exit(1);
|
Loading…
Add table
Add a link
Reference in a new issue