diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index 482dc0c21..1fba298ed 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -611,6 +611,12 @@ EOF; } } + if (isset($autoloads['files'])) { + foreach ($autoloads['files'] as $fileIdentifier => $file) { + composerRequire($fileIdentifier, $file); + } + } + return $loader; } @@ -1393,3 +1399,12 @@ INITIALIZER; return $sortedPackageMap; } } + +function composerRequire($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +}