Project

General

Profile

Actions

Bug #101159

closed

DependencyOrderingService cannot properly handle polyfill replaces

Added by Alexander Schnitzler 11 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
composer
Target version:
-
Start date:
2023-06-23
Due date:
% Done:

0%

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

Description

I found an issue with the DependencyOrderingService when using the following replaces in my root composer.json and then requiring an extension that depends on one of that polyfills.

As of https://github.com/symfony/polyfill#design, my root composer.json uses this replace section to not load the polyfills when my php version is high enough.

{
    "replace": {
        "paragonie/random_compat": "*",
        "symfony/polyfill-php54": "*",
        "symfony/polyfill-php55": "*",
        "symfony/polyfill-php56": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php72": "*",
        "symfony/polyfill-php73": "*",
        "symfony/polyfill-php74": "*",
        "symfony/polyfill-php81": "*",
        "symfony/polyfill-php82": "*" 
    },
}

This however is a problem with extensions that require such a polyfill. This then adds a dependency from the required extension to the virtual root package which itself requires the extension. The DependencyOrderingService then throws an exception:

Your dependencies have cycles. That will not work out. Cycles found ...

Since there is an issue with the virtual root package, the exceptions reports the full cycle of all packages. The actual underlying issue is quite hard to debug and find.


Related issues 1 (1 open0 closed)

Is duplicate of TYPO3 Core - Bug #96388: Error when replacing polyfill packages in the root composer.jsonUnder ReviewHelmut Hummel2021-12-19

Actions
Actions #1

Updated by Riccardo De Contardi 10 months ago

  • Is duplicate of Bug #96388: Error when replacing polyfill packages in the root composer.json added
Actions #2

Updated by Riccardo De Contardi 10 months ago

  • Status changed from New to Closed

I close this issue in agreement with the reporter as a duplicate of #96388 - please continue the discussion there; this issue has been linked to #96388 to keep track of it.

If you think that this is the wrong decision please reopen it or ping me and I'll do

Thank you.

Actions

Also available in: Atom PDF