Ver código fonte

Only look for .hh files at runtime if using HHVM

The ClassMap generator will look regardless, but that's not a runtime
cost, so seems desirable (in case composer install/update needs to be
called with php5 for some resaon)
Fred Emmott 11 anos atrás
pai
commit
7d3274224a
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      src/Composer/Autoload/ClassLoader.php

+ 1 - 1
src/Composer/Autoload/ClassLoader.php

@@ -292,7 +292,7 @@ class ClassLoader
         }
 
         $file = $this->findFileWithExtension($class, '.php');
-        if ($file === null) {
+        if ($file === null && defined('HHVM_VERSION')) {
           // Indicates a Hack file (hacklang.org)
           $file = $this->findFileWithExtension($class, '.hh');
         }