diff --git a/src/Composer/Autoload/AutoloadGenerator.php b/src/Composer/Autoload/AutoloadGenerator.php index 497df1e2a..2a66a4bf6 100644 --- a/src/Composer/Autoload/AutoloadGenerator.php +++ b/src/Composer/Autoload/AutoloadGenerator.php @@ -526,12 +526,19 @@ EOF; protected function getAutoloadFile($vendorPathToTargetDirCode, $suffix) { + $lastChar = $vendorPathToTargetDirCode[strlen($vendorPathToTargetDirCode)-1]; + if ("'" === $lastChar || '"' === $lastChar) { + $vendorPathToTargetDirCode = substr($vendorPathToTargetDirCode, 0, -1).'/autoload_real.php'.$lastChar; + } else { + $vendorPathToTargetDirCode .= " . '/autoload_real.php'"; + } + return <<