Merge pull request #29 from mlocati/uopz

Add support to UOPZ
pull/31/head
Michele Locati 2019-09-27 17:54:43 +02:00 committed by GitHub
commit 3db943c6c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 14 deletions

View File

@ -49,6 +49,7 @@ sysvsem 5.6 7.0 7.1 7.2 7.3
sysvshm 5.6 7.0 7.1 7.2 7.3 sysvshm 5.6 7.0 7.1 7.2 7.3
tidy 5.6 7.0 7.1 7.2 7.3 tidy 5.6 7.0 7.1 7.2 7.3
timezonedb 5.6 7.0 7.1 7.2 7.3 timezonedb 5.6 7.0 7.1 7.2 7.3
uopz 5.6 7.0 7.1 7.2 7.3
uuid 5.6 7.0 7.1 7.2 7.3 uuid 5.6 7.0 7.1 7.2 7.3
wddx 5.6 7.0 7.1 7.2 7.3 wddx 5.6 7.0 7.1 7.2 7.3
xdebug 5.6 7.0 7.1 7.2 7.3 xdebug 5.6 7.0 7.1 7.2 7.3

View File

@ -493,6 +493,15 @@ installPECLModule () {
installPECLModule_actual="${2}-2.5.5" installPECLModule_actual="${2}-2.5.5"
fi fi
;; ;;
uopz)
if test $1 -lt 700
then
installPECLModule_actual="${2}-2.0.7"
elif test $1 -lt 701
then
installPECLModule_actual="${2}-5.0.2"
fi
;;
yaml) yaml)
if test $1 -lt 700 if test $1 -lt 700
then then

View File

@ -1,22 +1,24 @@
<?php <?php
$extension = isset($argv[1]) ? trim($argv[1]) : ''; $extension = isset($argv[1]) ? trim($argv[1]) : '';
$rc = 1;
if ($extension === '') { if ($extension === '') {
fprintf(STDERR, "Missing module handle.\n"); fprintf(STDERR, "Missing module handle.\n");
exit(1); } else {
} $nameMap = array(
$nameMap = array( 'opcache' => 'Zend OPcache',
'opcache' => 'Zend OPcache', );
); $extensionLowerCase = strtolower($extension);
$extensionLowerCase = strtolower($extension); if (isset($nameMap[$extensionLowerCase])) {
if (isset($nameMap[$extensionLowerCase])) { $extension = $nameMap[$extensionLowerCase];
$extension = $nameMap[$extensionLowerCase]; }
if (!extension_loaded($extension)) {
fprintf(STDERR, sprintf("Extension not loaded: %s\n", $extension));
} else {
fprintf(STDOUT, sprintf("Extension correctly loaded: %s\n", $extension));
$rc = 0;
}
} }
if (extension_loaded($extension)) { exit($rc);
fprintf(STDOUT, sprintf("Extension correctly loaded: %s\n", $extension));
exit(0);
}
fprintf(STDERR, sprintf("Extension not loaded: %s\n", $extension));
exit(1);