diff --git a/src/Composer/DependencyResolver/Rule.php b/src/Composer/DependencyResolver/Rule.php index d08c4a5ed..aab1dabab 100644 --- a/src/Composer/DependencyResolver/Rule.php +++ b/src/Composer/DependencyResolver/Rule.php @@ -29,6 +29,8 @@ class Rule public $next1; public $next2; + public $ruleHash; + public function __construct(array $literals, $reason, $reasonData) { // sort all packages ascending by id @@ -85,7 +87,7 @@ class Rule } for ($i = 0, $n = count($this->literals); $i < $n; $i++) { - if (!$this->literals[$i]->getId() === $rule->literals[$i]->getId()) { + if (!($this->literals[$i]->getId() === $rule->literals[$i]->getId())) { return false; } } diff --git a/src/Composer/Downloader/GitDownloader.php b/src/Composer/Downloader/GitDownloader.php index 170749674..2a51c1e9f 100644 --- a/src/Composer/Downloader/GitDownloader.php +++ b/src/Composer/Downloader/GitDownloader.php @@ -48,6 +48,7 @@ class GitDownloader extends VcsDownloader */ protected function enforceCleanDirectory($path) { + $output = array(); $this->process->execute(sprintf('cd %s && git status --porcelain', escapeshellarg($path)), $output); if (trim($output)) { throw new \RuntimeException('Source directory has uncommitted changes'); diff --git a/src/Composer/Downloader/HgDownloader.php b/src/Composer/Downloader/HgDownloader.php index 768280845..a9953db0d 100644 --- a/src/Composer/Downloader/HgDownloader.php +++ b/src/Composer/Downloader/HgDownloader.php @@ -48,6 +48,7 @@ class HgDownloader extends VcsDownloader */ protected function enforceCleanDirectory($path) { + $output = array(); $this->process->execute(sprintf('cd %s && hg st', escapeshellarg($path)), $output); if (trim($output)) { throw new \RuntimeException('Source directory has uncommitted changes');