1
0
Fork 0

Merge pull request #2509 from glenjamin/opcache-ext

Ensure detected extensions have valid package names
pull/2512/head
Jordi Boggiano 2013-12-16 13:58:46 -08:00
commit 0e9a9a3875
1 changed files with 8 additions and 1 deletions

View File

@ -70,7 +70,8 @@ class PlatformRepository extends ArrayRepository
$version = $versionParser->normalize($prettyVersion); $version = $versionParser->normalize($prettyVersion);
} }
$ext = new CompletePackage('ext-'.$name, $version, $prettyVersion); $packageName = $this->buildPackageName($name);
$ext = new CompletePackage($packageName, $version, $prettyVersion);
$ext->setDescription('The '.$name.' PHP extension'); $ext->setDescription('The '.$name.' PHP extension');
parent::addPackage($ext); parent::addPackage($ext);
} }
@ -159,4 +160,10 @@ class PlatformRepository extends ArrayRepository
parent::addPackage($hhvm); parent::addPackage($hhvm);
} }
} }
private function buildPackageName($name)
{
return 'ext-' . str_replace(' ', '-', $name);
}
} }