From c7e1f49e783f92960441b88fe23bc1e933797daa Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Wed, 8 Jul 2015 19:11:05 +0200 Subject: [PATCH] Rule hashes are only used in the rule set, so no need to store them --- src/Composer/DependencyResolver/Rule.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Composer/DependencyResolver/Rule.php b/src/Composer/DependencyResolver/Rule.php index fe5085ae4..a19c121c2 100644 --- a/src/Composer/DependencyResolver/Rule.php +++ b/src/Composer/DependencyResolver/Rule.php @@ -43,8 +43,6 @@ class Rule protected $job; - protected $ruleHash; - public function __construct(array $literals, $reason, $reasonData, $job = null) { // sort all packages ascending by id @@ -58,13 +56,12 @@ class Rule $this->job = $job; $this->type = -1; - $data = unpack('ihash', md5(implode(',', $this->literals), true)); - $this->ruleHash = $data['hash']; } public function getHash() { - return $this->ruleHash; + $data = unpack('ihash', md5(implode(',', $this->literals), true)); + return $data['hash']; } public function setId($id) @@ -113,10 +110,6 @@ class Rule */ public function equals(Rule $rule) { - if ($this->ruleHash !== $rule->ruleHash) { - return false; - } - if (count($this->literals) != count($rule->literals)) { return false; }