Fix version parsing of PHP on some linux distros
parent
ae922eaf4c
commit
52888f193d
|
@ -26,7 +26,11 @@ class PlatformRepository extends ArrayRepository
|
||||||
{
|
{
|
||||||
parent::initialize();
|
parent::initialize();
|
||||||
|
|
||||||
$version = BasePackage::parseVersion(PHP_VERSION);
|
try {
|
||||||
|
$version = BasePackage::parseVersion(PHP_VERSION);
|
||||||
|
} catch (\UnexpectedValueException $e) {
|
||||||
|
$version = BasePackage::parseVersion(preg_replace('#^(.+?)(-.+)?#', '$1', PHP_VERSION));
|
||||||
|
}
|
||||||
|
|
||||||
// TODO mark as type platform and create a special installer that skips it + one that throws an exception
|
// TODO mark as type platform and create a special installer that skips it + one that throws an exception
|
||||||
$php = new MemoryPackage('php', $version['version'], $version['type']);
|
$php = new MemoryPackage('php', $version['version'], $version['type']);
|
||||||
|
|
Loading…
Reference in New Issue