1
0
Fork 0
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:
Michele Locati 2018-12-11 15:48:50 +01:00
parent 6fbd39d2fa
commit 817156a26f
3 changed files with 40 additions and 19 deletions

View 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);