diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index 28bb05cf9..01e16672e 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -399,10 +399,7 @@ class Installer || ($lockedPackage->getDistReference() && $lockedPackage->getDistReference() !== $package->getDistReference()) ) ) { - $newPackage = clone $package; - $newPackage->setSourceReference($lockedPackage->getSourceReference()); - $newPackage->setDistReference($lockedPackage->getDistReference()); - $operations[] = new UpdateOperation($package, $newPackage); + $operations[] = new UpdateOperation($package, $lockedPackage); break; }