if (!$link->getConstraint()->matches(new VersionConstraint('=', $internallyInstalledPackage->getVersion()))) {
// Solver was not handling this well so we will
// handle it here.
throw new \UnexpectedValueException('Package '.$internallyInstalledPackage->getName().' can not be updated because its version constraint ('.$link->getPrettyConstraint().') is not compatible with internally installed version ('.$internallyInstalledPackage->getPrettyVersion().')');
}
// This package is installed internally and has already
// been added to the request.
continue;
}
foreach ($installedPackages as $package) {
if ($package->getName() === $link->getTarget()) {
$request->update($package->getName(), new VersionConstraint('=', $package->getVersion()));
@ -150,17 +139,6 @@ EOT
foreach ($composer->getLocker()->getLockedPackages() as $package) {
$constraint = new VersionConstraint('=', $package->getVersion());
if (isset($internallyInstalledPackagesMap[$package->getName()])) {
if (!$constraint->matches(new VersionConstraint('=', $internallyInstalledPackage->getVersion()))) {
// Solver was not handling this well so we will
// handle it here.
throw new \UnexpectedValueException('Package '.$package->getName().' can not be installed because its version constraint ('.$package->getPrettyVersion().') is not compatible with internally installed version ('.$internallyInstalledPackage->getPrettyVersion().')');
}
// This package is installed internally and has already
if (!$link->getConstraint()->matches(new VersionConstraint('=', $internallyInstalledPackage->getVersion()))) {
// Solver was not handling this well so we will
// handle it here.
throw new \UnexpectedValueException('Package '.$internallyInstalledPackage->getName().' can not be installed because its version constraint ('.$link->getPrettyConstraint().') is not compatible with internally installed version ('.$internallyInstalledPackage->getPrettyVersion().')');
}
// This package is installed internally and has already