From 6508dc432203b30c27dc6aff2964fb287a95810b Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sat, 12 Sep 2015 22:29:19 +0100 Subject: [PATCH] Allow packages with only a dist ref to be force updated when the dist ref changes --- src/Composer/Installer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index 8aecea402..a61475f3c 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -569,7 +569,8 @@ class Installer if ('update' === $operation->getJobType() && $operation->getTargetPackage()->isDev() && $operation->getTargetPackage()->getVersion() === $operation->getInitialPackage()->getVersion() - && $operation->getTargetPackage()->getSourceReference() === $operation->getInitialPackage()->getSourceReference() + && (!$operation->getTargetPackage()->getSourceReference() || $operation->getTargetPackage()->getSourceReference() === $operation->getInitialPackage()->getSourceReference()) + && (!$operation->getTargetPackage()->getDistReference() || $operation->getTargetPackage()->getDistReference() === $operation->getInitialPackage()->getDistReference()) ) { if ($this->io->isDebug()) { $this->io->writeError(' - Skipping update of '. $operation->getTargetPackage()->getPrettyName().' to the same reference-locked version');