#81795New CLI API is broken with empty cache
Description
With empty cache, the new CLI API is broken.
Steps to reproduce:
- Clear all caches
- Call
php bin/typo3
This was introduced with #80452.
It happens, because extbase tries to load the configuration before the TCA was loaded.
Error message:
$ php bin/typo3
PHP Fatal error: Uncaught TYPO3\CMS\Core\Error\Exception: PHP Warning: Invalid argument supplied for foreach() in /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/RootlineUtility.php line 287 in /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Error/ErrorHandler.php:112
Stack trace:
#0 /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/RootlineUtility.php(287): TYPO3\CMS\Core\Error\ErrorHandler->handleError(2, 'Invalid argumen...', '/var/www/vagran...', 287, Array)
#1 /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/RootlineUtility.php(264): TYPO3\CMS\Core\Utility\RootlineUtility->enrichWithRelationFields(1, Array)
#2 /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/RootlineUtility.php(391): TYPO3\CMS\Core\Utility\RootlineUtility->getRecordArray(1)
#3 /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/RootlineUtility.php(207): TYPO3\CMS\Core\Utility\RootlineUtility->generateRootlineCache()
#4 /var/www/vagrant/htdocs/typo3_src in /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Error/ErrorHandler.php on line 112
Fatal error: Uncaught TYPO3\CMS\Core\Error\Exception: PHP Warning: Invalid argument supplied for foreach() in /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/RootlineUtility.php line 287 in /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Error/ErrorHandler.php on line 112
TYPO3\CMS\Core\Error\Exception: PHP Warning: Invalid argument supplied for foreach() in /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/RootlineUtility.php line 287 in /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Error/ErrorHandler.php on line 112
Call Stack:
0.0005 351608 1. {main}() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/bin/typo3:0
0.0005 351928 2. {closure:/var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/bin/typo3:20-23}() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/bin/typo3:23
0.9882 5748016 3. TYPO3\CMS\Core\Console\CommandApplication->run() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/bin/typo3:22
1.0036 5893200 4. TYPO3\CMS\Core\Core\Bootstrap->handleRequest() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Console/CommandApplication.php:75
1.0036 5893200 5. TYPO3\CMS\Core\Core\Bootstrap->resolveRequestHandler() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Core/Bootstrap.php:307
1.0477 6467168 6. TYPO3\CMS\Core\Console\CommandRequestHandler->canHandleRequest() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Core/Bootstrap.php:280
1.0477 6467168 7. TYPO3\CMS\Core\Console\CommandRequestHandler->populateAvailableCommands() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Console/CommandRequestHandler.php:101
1.0599 6483496 8. Symfony\Component\Console\Application->add() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Console/CommandRequestHandler.php:149
1.0599 6483496 9. TYPO3\CMS\Extbase\Command\CoreCommand->setApplication() /var/www/vagrant/htdocs/vendor/symfony/console/Application.php:422
1.0669 6510680 10. TYPO3\CMS\Extbase\Core\Bootstrap->initialize() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/extbase/Classes/Command/CoreCommand.php:58
1.4002 9999552 11. TYPO3\CMS\Extbase\Core\Bootstrap->configureObjectManager() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/extbase/Classes/Core/Bootstrap.php:88
1.4002 9999552 12. TYPO3\CMS\Extbase\Configuration\ConfigurationManager->getConfiguration() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/extbase/Classes/Core/Bootstrap.php:127
1.4002 9999552 13. TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager->getConfiguration() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/extbase/Classes/Configuration/ConfigurationManager.php:126
1.4002 9999584 14. TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager->getExtbaseConfiguration() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php:150
1.4002 9999584 15. TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager->getTypoScriptSetup() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php:216
1.4141 10549232 16. TYPO3\CMS\Frontend\Page\PageRepository->getRootLine() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php:67
1.4185 10618320 17. TYPO3\CMS\Core\Utility\RootlineUtility->get() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/frontend/Classes/Page/PageRepository.php:933
1.4195 10618320 18. TYPO3\CMS\Core\Utility\RootlineUtility->generateRootlineCache() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/RootlineUtility.php:207
1.4195 10618320 19. TYPO3\CMS\Core\Utility\RootlineUtility->getRecordArray() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/RootlineUtility.php:391
1.4210 10626568 20. TYPO3\CMS\Core\Utility\RootlineUtility->enrichWithRelationFields() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/RootlineUtility.php:264
1.4210 10627816 21. TYPO3\CMS\Core\Error\ErrorHandler->handleError() /var/www/vagrant/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/RootlineUtility.php:287Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.