فهرست منبع

Fix for composer. When running update/install command it's just do nothing, except writing "Installing dependencies"

Artem Lopata (bumz) 13 سال پیش
والد
کامیت
de066de198
2فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 1 1
      src/Composer/DependencyResolver/RuleSet.php
  2. 2 1
      src/Composer/DependencyResolver/RuleSetIterator.php

+ 1 - 1
src/Composer/DependencyResolver/RuleSet.php

@@ -55,7 +55,7 @@ class RuleSet implements \IteratorAggregate, \Countable
     public function add(Rule $rule, $type)
     {
         if (!isset(self::$types[$type])) {
-            throw OutOfBoundsException('Unknown rule type: ' . $type);
+            throw new \OutOfBoundsException('Unknown rule type: ' . $type);
         }
 
         if (!isset($this->rules[$type])) {

+ 2 - 1
src/Composer/DependencyResolver/RuleSetIterator.php

@@ -88,6 +88,7 @@ class RuleSetIterator implements \Iterator
 
     public function valid()
     {
-        return isset($this->rules[$this->currentType][$this->currentOffset]);
+        return isset($this->rules[$this->currentType])
+               && isset($this->rules[$this->currentType][$this->currentOffset]);
     }
 }