From 3a0e4af1329cc387f3b3e4b7d5a00fe4f09b993a Mon Sep 17 00:00:00 2001 From: Beau Simensen Date: Fri, 10 May 2013 12:25:23 -0500 Subject: [PATCH] Ensure packages in additional installed repository are not updated The underlying assumption of the additional installed repository is that those packages are installed in such a way that they cannot be updated. Prior to this fix they were still candidates for change. This ensures that they are treated like platform and root packages and are not candidates for update. --- src/Composer/Installer.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index ba602832c..f1e1f5267 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -560,8 +560,14 @@ class Installer $constraint->setPrettyString($rootPackage->getPrettyVersion()); $request->install($rootPackage->getName(), $constraint); + $installedPackages = $platformRepo->getPackages(); + if ($this->additionalInstalledRepository) { + $additionalInstalledPackages = $this->additionalInstalledRepository->getPackages(); + $installedPackages = array_merge($installedPackages, $additionalInstalledPackages); + } + // fix the version of all platform packages to prevent the solver trying to remove those - foreach ($platformRepo->getPackages() as $package) { + foreach ($installedPackages as $package) { $constraint = new VersionConstraint('=', $package->getVersion()); $constraint->setPrettyString($package->getPrettyVersion());