Skip to content

Commit

Permalink
Ensure dist url/type/checksum remain the same when doing lock hash up…
Browse files Browse the repository at this point in the history
…dates, refs #11787
  • Loading branch information
Seldaek committed Jan 10, 2024
1 parent ca43307 commit 042a8c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Composer/DependencyResolver/LockTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ public function getNewLockPackages(bool $devMode, bool $updateMirrors = false):
if ($package->getName() === $presentPackage->getName() && $package->getVersion() === $presentPackage->getVersion()) {
if ($presentPackage->getSourceReference() && $presentPackage->getSourceType() === $package->getSourceType()) {
$package->setSourceDistReferences($presentPackage->getSourceReference());
$package->setDistUrl($presentPackage->getDistUrl());
$package->setDistType($presentPackage->getDistType());
$package->setDistSha1Checksum($presentPackage->getDistSha1Checksum());

Check failure on line 116 in src/Composer/DependencyResolver/LockTransaction.php

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, false)

Call to an undefined method Composer\Package\BasePackage::setDistSha1Checksum().

Check failure on line 116 in src/Composer/DependencyResolver/LockTransaction.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, true)

Call to an undefined method Composer\Package\BasePackage::setDistSha1Checksum().
}
if ($presentPackage->getReleaseDate() !== null && $package instanceof Package) {
$package->setReleaseDate($presentPackage->getReleaseDate());
Expand Down

0 comments on commit 042a8c2

Please sign in to comment.