Project

General

Profile

Actions

Bug #95305

closed

ExtensionManagementUtility::isLoaded() cannot be used in Configuration/Services.php

Added by Chris Müller almost 3 years ago. Updated almost 3 years ago.

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

0%

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

Description

When using the following code in Configuration/Services.php to check if an extension is loaded:

return function (ContainerConfigurator $configurator): void {
    if (!ExtensionManagementUtility::isLoaded('dashboard')) {
        return;
    }

    // ... register widgets
}

the following exception is thrown:

Call to a member function isPackageActive() on null
in /var/www/html/public/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php line 120

This is since TYPO3 11.4, in 11.3 it worked.


Related issues 2 (0 open2 closed)

Is duplicate of TYPO3 Core - Bug #95327: Push PackageManager to ExtensionManagementUtility in bootstrapClosed2021-09-23

Actions
Has duplicate TYPO3 Core - Bug #95401: Site configuration imports broken in v11.4Closed2021-09-29

Actions
Actions

Also available in: Atom PDF