Fix openssl/pcre matches, and skip other exts properly
parent
887d913eb6
commit
95bc5c4898
|
@ -80,12 +80,13 @@ class PlatformRepository extends ArrayRepository
|
|||
break;
|
||||
|
||||
case 'openssl':
|
||||
$prettyVersion = str_replace('OpenSSL', '', OPENSSL_VERSION_TEXT);
|
||||
$prettyVersion = trim($prettyVersion);
|
||||
$prettyVersion = preg_replace_callback('{^(?:OpenSSL\s*)?([0-9.]+)([a-z]?).*}', function ($match) {
|
||||
return $match[1] . (empty($match[2]) ? '' : '.'.(ord($match[2]) - 96));
|
||||
}, OPENSSL_VERSION_TEXT);
|
||||
break;
|
||||
|
||||
case 'pcre':
|
||||
$prettyVersion = PCRE_VERSION;
|
||||
$prettyVersion = preg_replace('{^(\S+).*}', '$1', PCRE_VERSION);
|
||||
break;
|
||||
|
||||
case 'uuid':
|
||||
|
@ -98,7 +99,7 @@ class PlatformRepository extends ArrayRepository
|
|||
|
||||
default:
|
||||
// None handled extensions have no special cases, skip
|
||||
continue;
|
||||
continue 2;
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -107,9 +108,9 @@ class PlatformRepository extends ArrayRepository
|
|||
continue;
|
||||
}
|
||||
|
||||
$ext = new MemoryPackage('lib-'.$name, $version, $prettyVersion);
|
||||
$ext->setDescription('The '.$name.' PHP library');
|
||||
parent::addPackage($ext);
|
||||
$lib = new MemoryPackage('lib-'.$name, $version, $prettyVersion);
|
||||
$lib->setDescription('The '.$name.' PHP library');
|
||||
parent::addPackage($lib);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue