Explorar el Código

Allow calling getProviderNames multiple times, refs #8516

Jordi Boggiano hace 5 años
padre
commit
0b767e0b83
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5 2
      src/Composer/Repository/ComposerRepository.php

+ 5 - 2
src/Composer/Repository/ComposerRepository.php

@@ -249,8 +249,11 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
             $this->loadProviderListings($this->loadRootServerFile());
         }
 
-        if ($this->hasPartialPackages && null === $this->partialPackagesByName) {
-            $this->initializePartialPackages();
+        if ($this->hasPartialPackages) {
+            if (null === $this->partialPackagesByName) {
+                $this->initializePartialPackages();
+            }
+
             return array_keys($this->partialPackagesByName);
         }