From 7d3274224aa5e4b1b7efb27a3fb02291546b9590 Mon Sep 17 00:00:00 2001 From: Fred Emmott Date: Tue, 18 Mar 2014 16:21:41 -0700 Subject: [PATCH] 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) --- src/Composer/Autoload/ClassLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Autoload/ClassLoader.php b/src/Composer/Autoload/ClassLoader.php index 150cfc881..e27edeb1d 100644 --- a/src/Composer/Autoload/ClassLoader.php +++ b/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'); }