File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 */
1212
1313use Composer \Composer ;
14+ use Composer \Config as ComposerConfig ;
1415use Composer \IO \IOInterface ;
1516use Composer \Util \Filesystem ;
1617use TYPO3 \CMS \Composer \Plugin \Core \IncludeFile \TokenInterface ;
@@ -61,13 +62,15 @@ public function register()
6162 $ this ->io ->writeError ('<info>Register typo3/class-alias-loader file in root package autoload definition</info> ' , true , IOInterface::VERBOSE );
6263
6364 // Generate and write the file
64- $ includeFile = $ this ->composer ->getConfig ()->get ('vendor-dir ' ) . self ::INCLUDE_FILE ;
65+ $ config = $ this ->composer ->getConfig ();
66+ $ includeFile = $ config ->get ('vendor-dir ' ) . self ::INCLUDE_FILE ;
67+ $ relativeIncludeFile = $ config ->get ('vendor-dir ' , ComposerConfig::RELATIVE_PATHS ) . self ::INCLUDE_FILE ;
6568 file_put_contents ($ includeFile , $ this ->getIncludeFileContent (dirname ($ includeFile )));
6669
6770 // Register the file in the root package
6871 $ rootPackage = $ this ->composer ->getPackage ();
6972 $ autoloadDefinition = $ rootPackage ->getAutoload ();
70- $ autoloadDefinition ['files ' ][] = $ includeFile ;
73+ $ autoloadDefinition ['files ' ][] = $ relativeIncludeFile ;
7174 $ rootPackage ->setAutoload ($ autoloadDefinition );
7275 }
7376
You can’t perform that action at this time.
0 commit comments