1
0
Fork 0

Lowercase package names in Request (fixes tests)

pull/18/head
Jordi Boggiano 2011-09-17 13:23:17 +02:00
parent aeebd02ee5
commit 6b5f61943a
2 changed files with 5 additions and 6 deletions

View File

@ -82,7 +82,6 @@ EOT
// TODO there should be an update flag or dedicated update command
// TODO check lock file to remove packages that disappeared from the requirements
foreach ($config['require'] as $name => $version) {
$name = strtolower($name);
if ('latest' === $version) {
$request->install($name);
} else {

View File

@ -29,27 +29,27 @@ class Request
public function install($packageName, LinkConstraintInterface $constraint = null)
{
$this->addJob($packageName, 'install', $constraint);
$this->addJob(strtolower($packageName), 'install', $constraint);
}
public function update($packageName, LinkConstraintInterface $constraint = null)
{
$this->addJob($packageName, 'update', $constraint);
$this->addJob(strtolower($packageName), 'update', $constraint);
}
public function remove($packageName, LinkConstraintInterface $constraint = null)
{
$this->addJob($packageName, 'remove', $constraint);
$this->addJob(strtolower($packageName), 'remove', $constraint);
}
protected function addJob($packageName, $cmd, LinkConstraintInterface $constraint = null)
{
$packages = $this->pool->whatProvides($packageName, $constraint);
$packages = $this->pool->whatProvides(strtolower($packageName), $constraint);
$this->jobs[] = array(
'packages' => $packages,
'cmd' => $cmd,
'packageName' => $packageName,
'packageName' => strtolower($packageName),
);
}