瀏覽代碼

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 年之前
父節點
當前提交
7d3274224a
共有 1 個文件被更改,包括 1 次插入1 次删除
  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');
         }