Ensure detected extensions have valid package names
parent
80499bb024
commit
3620796b7d
|
@ -70,7 +70,8 @@ class PlatformRepository extends ArrayRepository
|
|||
$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');
|
||||
parent::addPackage($ext);
|
||||
}
|
||||
|
@ -159,4 +160,10 @@ class PlatformRepository extends ArrayRepository
|
|||
parent::addPackage($hhvm);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function buildPackageName($name)
|
||||
{
|
||||
return 'ext-' . str_replace(' ', '-', $name);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue