소스 검색

Do not fetch from repo for packages that obviously can not be there

Jordi Boggiano 12 년 전
부모
커밋
41c7432fef
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/Composer/Repository/ComposerRepository.php

+ 4 - 0
src/Composer/Repository/ComposerRepository.php

@@ -196,6 +196,10 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
 
     public function whatProvides($name)
     {
+        if ($name === 'php' || in_array(substr($name, 0, 4), array('ext-', 'lib-'), true) || $name === '__root__') {
+            return array();
+        }
+
         if (isset($this->providers[$name])) {
             return $this->providers[$name];
         }