diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index 157987b9e..9d9583e55 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -475,8 +475,9 @@ EOF; protected function getIncludeFilesFile(array $files, Filesystem $filesystem, $basePath, $vendorPath, $vendorPathCode, $appBaseDirCode) { $filesCode = ''; - foreach ($files as $functionFile) { - $filesCode .= ' '.$this->getPathCode($filesystem, $basePath, $vendorPath, $functionFile).",\n"; + foreach ($files as $fileIdentifier => $functionFile) { + $filesCode .= ' ' . $fileIdentifier . ' => ' + . $this->getPathCode($filesystem, $basePath, $vendorPath, $functionFile) . ",\n"; } if (!$filesCode) { @@ -649,8 +650,8 @@ REGISTER_LOADER; if ($useIncludeFiles) { $file .= << \$file) { + composerRequire$suffix(\$fileIdentifier, \$file); } @@ -668,9 +669,17 @@ METHOD_FOOTER; return $file . <<