1
0
Fork 0

Ensure detected extensions have valid package names

pull/2509/head
Glen Mailer 2013-12-16 08:51:19 +00:00
parent 80499bb024
commit 3620796b7d
1 changed files with 8 additions and 1 deletions

View File

@ -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);
}
}