1
0
Fork 0

Fix solving issue when provide provides a platform package that is already installed, fixes #1171

pull/1366/head
Jordi Boggiano 2012-11-27 13:55:20 +01:00
parent cd4d569540
commit ead17b2680
1 changed files with 8 additions and 1 deletions

View File

@ -333,7 +333,14 @@ class Installer
$constraint = new VersionConstraint('=', $package->getVersion());
$constraint->setPrettyString($package->getPrettyVersion());
$request->install($package->getName(), $constraint);
if (!($package->getRepository() instanceof PlatformRepository)
|| !($provided = $this->package->getProvides())
|| !isset($provided[$package->getName()])
|| !$provided[$package->getName()]->getConstraint()->matches($constraint)
) {
$request->install($package->getName(), $constraint);
}
}
// if the updateWhitelist is enabled, packages not in it are also fixed