Search code examples
composer-phptypo3typo3-11.x

TYPO3 error after dump-autoload: call to undefined method


I have a running TYPO3 project running on Docker windows with WSL2 Ubuntu subsystem.

I have changed some TCA columns in my custom TYPO3 extension, the project still running good until I run this command (was trying to update):

composer dump-autoload -a

This is the result error that shows in powershell :

PHP Fatal error: Uncaught Error: Call to undefined method Composer\Repository\PlatformRepository::isPlatformPackage() in .../web/typo3/sysext/core/Classes/Composer/PackageArtifactBuilder.php:75 Stack trace: #0 .../web/typo3/sysext/core/Classes/Package/PackageManager.php(1111): TYPO3\CMS\Core\Composer\PackageArtifactBuilder->isComposerDependency() #1 .../web/typo3/sysext/core/Classes/Package/PackageManager.php(1197): TYPO3\CMS\Core\Package\PackageManager->convertConfigurationForGraph() #2 .../web/typo3/sysext/core/Classes/Package/PackageManager.php(1085): TYPO3\CMS\Core\Package\PackageManager->buildDependencyGraph() #3 .../web/typo3/sysext/core/Classes/Composer/PackageArtifactBuilder.php(138): TYPO3\CMS\Core\Package\PackageManager->sortPackageStatesConfigurationByDependency() #4 .../web/typo3/sysext/core/Classes/Co in .../web/typo3/sysext/core/Classes/Composer/PackageArtifactBuilder.php on line 75

I don't understand why this command has broke my project and now I'm stuck.

I have already tried to rebuild all the container with composer down and up. No results.


Solution

  • The answer to this issue is that i should excute the composer inside the tool container of this project.