|
@@ -388,7 +388,12 @@ class Installer
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- if (isset($lockedReference) && $lockedReference !== $package->getSourceReference()) {
|
|
|
+ $sourceReference = $package->getSourceReference() ?: $package->getDistReference();
|
|
|
+ if (isset($lockedReference) && $lockedReference !== $sourceReference) {
|
|
|
+ if (!$package->getSourceType() && $package->getDistType()) {
|
|
|
+ throw new \RuntimeException(sprintf('Dist reference (%s) does not match locked reference (%s)', $sourceReference, $lockedReference));
|
|
|
+ }
|
|
|
+
|
|
|
// changing the source ref to update to will be handled in the operations loop below
|
|
|
$operations[] = new UpdateOperation($package, clone $package);
|
|
|
}
|