Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Prioritize composer.json to resolve extension-key #634

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sbuerk
Copy link
Collaborator

@sbuerk sbuerk commented Oct 15, 2024

The testing-framework internal composer package management
used to determine source location of extensions to provide
them in the functional test instances (legacy mode) stores
extension packages in internal property state by the TYPO3
extension key. In case ext_emconf.php does not exist in
a extension, the fallback determined it by normalizing the
package name from the composer name or used the basename
of the source location folder as extension key.

The fallback logic was based on the need to allow loading
functional test fixture extension.

TYPO3 extension are sensitive to loading order which is
determined in different ways depending on the installation
mode. To mimic the TYPO3 core legacy mode sorting, custom
package sorting has been added to the testing-framework,
which has to deal with the fact that extension may not
provide a ext_emconf.php anymore, which is not needed
for composer installations.

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.

The root cause for this is the fact, that the composer.json
entry for the extension-key has not been used as first
source when reading extension from the filesystem. With this
change, places dealing to determine extension key from package
now respects the composer.json extension-key as first source.

Resolves: #541
Releases: main, 8

The testing-framework internal composer package management
used to determine source location of extensions to provide
them in the functional test instances (legacy mode) stores
extension packages in internal property state by the TYPO3
extension key. In case `ext_emconf.php` does not exist in
a extension, the fallback determined it by normalizing the
package name from the composer name or used the basename
of the source location folder as extension key.

The fallback logic was based on the need to allow loading
functional test fixture extension.

TYPO3 extension are sensitive to loading order which is
determined in different ways depending on the installation
mode. To mimic the TYPO3 core legacy mode sorting, custom
package sorting has been added to the testing-framework,
which has to deal with the fact that extension may not
provide a `ext_emconf.php` anymore, which is not needed
for composer installations.

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.

The root cause for this is the fact, that the composer.json
entry for the `extension-key` has not been used as first
source when reading extension from the filesystem. With this
change, places dealing to determine extension key from package
now respects the composer.json extension-key as first source.

Resolves: #541
Releases: main, 8
@sbuerk sbuerk marked this pull request as draft October 15, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for dependencies to TYPO3 Extensions without ext_emconf.php
2 participants