Project

General

Profile

Actions

Bug #93569

closed

console command 'extension:activate' throws error

Added by Ralf Zimmermann over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
System/Bootstrap/Configuration
Target version:
-
Start date:
2021-02-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Since #93442 (https://review.typo3.org/c/Packages/TYPO3.CMS/+/67648) the console command

bin/typo3 extension:activate xxx
fails with the following error

Uncaught TYPO3 Exception Too few arguments to function TYPO3\CMS\Core\ExpressionLanguage\ProviderConfigurationLoader::__construct(), 0 passed in /some/path/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 3222 and exactly 2 expected
thrown in file /some/path/typo3/sysext/core/Classes/ExpressionLanguage/ProviderConfigurationLoader.php
in line 35

Tested with completely new TYPO3 instances (empty 'var/' directory and so on).


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Task #93442: Inject PackageManager and cache into ExpressionLanguage/ProviderConfigurationLoaderClosedBenjamin Franzke2021-02-05

Actions
Related to TYPO3 Core - Bug #86248: CLI upgrade wizards can not be invoked fully uncachedClosed2018-09-13

Actions
Related to TYPO3 Core - Bug #93721: Activating/Deactivating extensions through CLI results in a PHP errorClosed2021-03-12

Actions
Actions #1

Updated by Ralf Zimmermann over 3 years ago

  • Description updated (diff)
Actions #2

Updated by Ralf Zimmermann over 3 years ago

\TYPO3\CMS\Core\Console\CommandApplication->run tries to bootstrap a non-failsafe container https://github.com/TYPO3/TYPO3.CMS/blob/f22a127800fff528296dffa5ffbdd518d4811611/typo3/sysext/core/Classes/Console/CommandApplication.php#L103.
Before that there is only the failsafe container available.
"$this->application->find()" for the command "extension:activate" fires a DI chain (on the failsafe container) which, however, already needs an non-failsafe container (constructor DI for an extbase repo -> configuration manager -> TypoScript -> condition matcher -> expression language)

A shrinked trace:

Symfony\Component\Console\Application->find\\('extension:activate') Code
TYPO3\CMS\Core\Console\CommandRegistry->getInstance('TYPO3\\CMS\\Extensionmanager\\Command\ActivateExtensionCommand') Code

  • $this->container->get('TYPO3\\CMS\\Extensionmanager\\Command\ActivateExtensionCommand') // $this->container === TYPO3\CMS\Core\DependencyInjection\FailsafeContainer

ActivateExtensionCommand->__construct->InstallUtility $installUtility Code
InstallUtility->injectListUtility(ListUtility $listUtility) Code
ListUtility->injectExtensionRepository(ExtensionRepository $extensionRepository) Code
ExtensionRepository->objectManager->get(QuerySettingsInterface::class) Code
TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings->initializeObject Code

  • $configurationManager->isFeatureEnabled('ignoreAllEnableFieldsInBe') // $configurationManager === TYPO3\CMS\Extbase\Configuration\ConfigurationManager

ConfigurationManager->isFeatureEnabled Code

  • $this->concreteConfigurationManager->getConfiguration($extensionName, $pluginName)
  • $template->generateConfig() // $template == TYPO3\CMS\Core\TypoScript\TemplateService Code

$matchObj = GeneralUtility::makeInstance(ConditionMatcher::class) Code
$this->expressionLanguageResolver = GeneralUtility::makeInstance(\TYPO3\CMS\Core\ExpressionLanguage\Resolver::class, 'typoscript', $this->expressionLanguageResolverVariables) Code
GeneralUtility::makeInstance(\TYPO3\CMS\Core\ExpressionLanguage\ProviderConfigurationLoader::class) Code

GeneralUtility->makeInstance Code

  • self::$container->has(\TYPO3\CMS\Core\ExpressionLanguage\ProviderConfigurationLoader) // self::$container === TYPO3\CMS\Core\DependencyInjection\FailsafeContainer
  • self::$container->has(\TYPO3\CMS\Core\ExpressionLanguage\ProviderConfigurationLoader) === false
Actions #3

Updated by Christian Kuhn over 3 years ago

  • Related to Task #93442: Inject PackageManager and cache into ExpressionLanguage/ProviderConfigurationLoader added
Actions #4

Updated by Gerrit Code Review over 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68254

Actions #5

Updated by Gerrit Code Review over 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68254

Actions #6

Updated by Gerrit Code Review over 3 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68254

Actions #7

Updated by Gerrit Code Review over 3 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68254

Actions #8

Updated by Benjamin Franzke over 3 years ago

  • Related to Bug #86248: CLI upgrade wizards can not be invoked fully uncached added
Actions #9

Updated by Benjamin Franzke over 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Benjamin Franzke over 3 years ago

  • Related to Bug #93721: Activating/Deactivating extensions through CLI results in a PHP error added
Actions #11

Updated by Benni Mack about 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF