|
|
|
@ -346,7 +346,7 @@ EOF;
|
|
|
|
|
$classmapFile .= ");\n";
|
|
|
|
|
|
|
|
|
|
if (!$suffix) {
|
|
|
|
|
if (!$config->get('autoloader-suffix') && is_readable($vendorPath.'/autoload.php')) {
|
|
|
|
|
if (!$config->get('autoloader-suffix') && Filesystem::isReadable($vendorPath.'/autoload.php')) {
|
|
|
|
|
$content = file_get_contents($vendorPath.'/autoload.php');
|
|
|
|
|
if (preg_match('{ComposerAutoloaderInit([^:\s]+)::}', $content, $match)) {
|
|
|
|
|
$suffix = $match[1];
|
|
|
|
@ -1131,7 +1131,7 @@ INITIALIZER;
|
|
|
|
|
|
|
|
|
|
foreach ($autoload[$type] as $namespace => $paths) {
|
|
|
|
|
foreach ((array) $paths as $path) {
|
|
|
|
|
if (($type === 'files' || $type === 'classmap' || $type === 'exclude-from-classmap') && $package->getTargetDir() && !is_readable($installPath.'/'.$path)) {
|
|
|
|
|
if (($type === 'files' || $type === 'classmap' || $type === 'exclude-from-classmap') && $package->getTargetDir() && !Filesystem::isReadable($installPath.'/'.$path)) {
|
|
|
|
|
// remove target-dir from file paths of the root package
|
|
|
|
|
if ($package === $rootPackage) {
|
|
|
|
|
$targetDir = str_replace('\\<dirsep\\>', '[\\\\/]', preg_quote(str_replace(array('/', '\\'), '<dirsep>', $package->getTargetDir())));
|
|
|
|
|