diff --git a/src/Composer/Package/Locker.php b/src/Composer/Package/Locker.php index e03b6bd6a..f832e797c 100644 --- a/src/Composer/Package/Locker.php +++ b/src/Composer/Package/Locker.php @@ -515,7 +515,7 @@ class Locker if ($includeDev === true) { $sets[] = ['repo' => $this->getLockedRepository(true), 'method' => 'getDevRequires', 'description' => 'Required (in require-dev)']; } - $rootRepo = new RootPackageRepository($package); + $rootRepo = new RootPackageRepository(clone $package); foreach ($sets as $set) { $installedRepo = new InstalledRepository([$set['repo'], $rootRepo]);