-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Respect
composer mode only
extension in FunctionalTestCase
The `typo3/testing-framework` creates functional test instances as "classic" mode instances, writing a `PackageStates.php` file composed using composer information, provided and handled by the internal `ComposerPackageManager` class. Extensions in the state file are not sorted based on their dependencies and suggestions. To mitigate this and having a correctly sorted extension state file, the `PackageCollection` service has been introduced with the goal to resort the extension state file after the initial write to provide the correct sorted extension state. The extension sorting within the state file is important, as the TYPO3 Core uses this sorting to loop over extensions to collect information from the extensions, for example TCA, TCAOverrides, ext_localconf.php and other things. Package sorting is here very important to allow extensions to reconfigure or change the stuff from other extensions, which is guaranteed in normal "composer" and "classic" mode instances. For "classic" mode instances, only the `ext_emconf.php` file is taken into account and "composer.json" as the source of thruth for "composer" mode instances since TYPO3 v12, which made the `ext_emconf.php` file obsolete for extensions only installed with composer. Many agencies removed the optional `ext_emconf.php` file for project local path extensions like a sitepackage to remove the maintenance burden, which is a valid case. Sadly, the `PackageCollection` adopted from the TYPO3 Core `PackageManager` did not reflected this case and failed for extensions to properly sort only on extension dependencies and keys due the mix of extension key and composer package name handling. Extension depending on another extension failed to be sorted correctly with following exception: UnexpectedValueException: The package "extension_key" depends on "composer/package-key" which is not present in the system. This change modifies the `PackageCollection` implementation to take only TYPO3 extension and system extension into account for dependency resolving and sorting, using `ext_emconf.php` depends/suggest information as first source and falling back to `composer` require and suggestion information. Resolves: #541 Releases: main, 8
- Loading branch information
1 parent
0fa866c
commit 1889534
Showing
17 changed files
with
529 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.