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] Ignore non-typo3 packages in PackageState #519

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

tweis
Copy link
Contributor

@tweis tweis commented Nov 20, 2023

The testing-framework creates test instances per
functional test-case based on properties defining
the system extensions, extension and fixture test
extension to symlink and load in the non-composer
test instances.

Therefore, the PackageStates.php file is created
on the first test run per test-case manually based
on the provided properties in the defined order.

With [1] a PackageCollection class has been added
to ensure proper extension sorting in the packages
state file based on dependency informations. That
is essentially for the loading and processing order.

Since TYPO3 v12 extensions in composer mode no longer
requires the presence of a ext_emconf.php versus
non-composer mode. The ext_emconf.php is still added
if a extension is published to TER. Therefore, some
extension authors removed a manual ext_emconf.php
from their extensions.

Extension composer.json may contain non-extension
packages as dependencies (require), which is not
handled by the PackageCollection due to the fact
that it assumes that all required packages are valid
extensions.

This change modifies the dependency validation method
PackageCollection->isComposerDependency() using the
ComposerPackageManager class information to determine
if a package is a extension or not.

For example platform requires like "php" or packages
like "composer/installers" are no longer used for
dependency ordering and therefore throwing a exception.

[1] b2b158f

Resolves: #510
Releases: main

@tweis tweis force-pushed the feature/composer-support branch from 77c1d61 to e57a9f9 Compare November 20, 2023 18:44
@sbuerk sbuerk force-pushed the feature/composer-support branch from e57a9f9 to 861c922 Compare November 21, 2023 21:26
@sbuerk sbuerk changed the title [FEATURE] Add composer dependency support for PackageCollection [BUGFIX] Ignore non-typo3 packages in PackageState Nov 21, 2023
@sbuerk sbuerk force-pushed the feature/composer-support branch 4 times, most recently from 28cd91c to caf60ef Compare November 21, 2023 21:34
The testing-framework creates test instances per
functional test-case based on properties defining
the system extensions, extension and fixture test
extension to symlink and load in the non-composer
test instances.

Therefore, the `PackageStates.php` file is created
on the first test run per test-case manually based
on the provided properties in the defined order.

With [1] a `PackageCollection` class has been added
to ensure proper extension sorting in the packages
state file based on dependency informations. That
is essentially for the loading and processing order.

Since TYPO3 v12 extensions in composer mode no longer
requires the presence of a `ext_emconf.php` versus
non-composer mode. The `ext_emconf.php` is still added
if a extension is published to TER. Therefore, some
extension authors removed a manual `ext_emconf.php`
from their extensions.

Extension composer.json may contain non-extension
packages as dependencies (`require`), which is not
handled by the PackageCollection due to the fact
that it assumes that all required packages are valid
extensions.

This change modifies the dependency validation method
`PackageCollection->isComposerDependency()` using the
`ComposerPackageManager` class information to determine
if a package is a extension or not.

For example platform requires like `"php"` or packages
like `"composer/installers"` are no longer used for
dependency ordering and therefore throwing a exception.

[1] b2b158f

Resolves: TYPO3#510
Releases: main
@sbuerk sbuerk force-pushed the feature/composer-support branch from caf60ef to 1dad4da Compare November 22, 2023 11:02
@sbuerk sbuerk merged commit ee0df3c into TYPO3:main Nov 22, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants