[TYPO3-english] Re: TYPO3 via Composer integration

Viktor Livakivskyi invisible.kinder at gmail.com
Wed Mar 25 12:19:45 CET 2015

Hi, again.

I thought all is fine under 6.2.10. 
6.2.11 was released, which breaks the flow, unfortunately.

Under same circumstances I'm getting:
PHP Catchable fatal error:  Argument 1 passed to TYPO3\CMS\Core\Core\ClassAliasMap::injectComposerClassLoader() must be an instance of Helhum\ClassAliasLoader\Composer\ClassAliasLoader, instance of Composer\Autoload\ClassLoader given, called in /path/typo3_src/typo3/sysext/core/Classes/Core/Bootstrap.php on line 284 and defined in /path/typo3_src/typo3/sysext/core/Classes/Core/ClassAliasMap.php on line 86

This happens on early Bootstraping:

1. Bootstrap->baseSetup() is called, which calls $this->initializeComposerClassLoader();

2. initializeComposerClassLoader() looks for '/../../../../../../Packages/Libraries/autoload.php' file, which is present in a system and icludes it

3. Bootstrap->baseSetup() calls $this->setEarlyInstance('Composer\\Autoload\\ClassLoader', $composerClassLoader);

4. Since $composerClassLoader contains result of /Packages/Libraries/autoload.php it contains instance of \Composer\Autoload\ClassLoader (look at composer/autoload_real.php:  self::$loader = $loader = new \Composer\Autoload\ClassLoader();)

5. Bootstrap->initializeClassLoader() is called, which calls $classAliasMap->injectComposerClassLoader($this->getEarlyInstance('Composer\\Autoload\\ClassLoader'));

6. injectComposerClassLoader() expects instance of Helhum\ClassAliasLoader\Composer\ClassAliasLoader, but it will never be there, because we've set \Composer\Autoload\ClassLoader on step 3 before!

So, my questions are:
1. Does anyone using Composer class loader on 6.2?
2. What am I doing wrong here?
3. Is it a bug?

More information about the TYPO3-english mailing list