Bug #95647

EXT-dependencies not respected when loading ext_localconf.php

Added by David Bascom 3 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
System/Bootstrap/Configuration
Target version:
-
Start date:
2021-10-14
Due date:
% Done:

100%

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

Description

I have a composer based TYPO3 installation with two extensions: EXT:one and EXT:two.

The extension EXT:one depends on EXT:two. The dependency is defined in the ext_emconf.php.

In the ext_localconf.php of EXT:one I am calling helper-functions / static methods from EXT:two. This throws an error, saying the methods are unknown / not registered, meaning EXT:two is not present / was not loaded when the code in the ext_localconf.php is executed.

In the loading order of the individual ext_localconf.php the alphabetic order of the extensions-folders seems to play a role. No error is thrown, if I rename EXT:one to EXT:zork. "Z" seems to be loaded AFTER "T".

I can fix this issue by adding the dependency to the composer.json of EXT:one:

{
  ...
  "require": {
    "nng/two":"..." 
  }
}

It seems that everything worked fine up till version 11.5

#1

Updated by Georg Ringer 3 months ago

  • Status changed from New to Closed

Check out https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/11.4/Feature-94996-ConsiderAllComposerInstalledExtensionsAsActive.html

The ext_emconf.php file of extensions is now obsolete and therefore completely ignored in Composer based instances. Make sure the information in the composer.json file is in sync with the one in your ext_emconf.php file in case you want to provide one for compatibility with non Composer mode.

So the way to use the require or suggest section in composer.json is the way to go

#2

Updated by Georg Ringer 3 months ago

  • Status changed from Closed to Accepted

I reopen the issue because after some discussions it seems the documentation should be improved in that regard

#3

Updated by Gerrit Code Review 3 months ago

  • Status changed from Accepted 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/+/71805

#4

Updated by Gerrit Code Review 3 months 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/+/71805

#5

Updated by Gerrit Code Review 3 months 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/+/71805

#6

Updated by Gerrit Code Review 3 months 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/+/71805

#7

Updated by Gerrit Code Review 3 months ago

Patch set 5 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/+/71805

#8

Updated by Gerrit Code Review 3 months ago

Patch set 6 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/+/71805

#9

Updated by Gerrit Code Review 3 months ago

Patch set 7 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/+/71805

#10

Updated by Georg Ringer 3 months ago

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

Also available in: Atom PDF