#109552Package sorting doesn't take `suggested` packages into account anymore
Description
Reported in slack by @danilovq
Slack Thread: https://typo3.slack.com/archives/C03AM9R17/p1775828703478429
I think I've found a problem in PackageManager::getSuggestionArrayForPackage() that affects dependency resolution via suggest constraints. The method calls $constraint->getValue() which returns a composer vendor‑qualified name (e.g. typo3/cms-lowlevel), but then tries to use that string directly as a key in $this->packages. However, $this->packages is indexed by extension key (e.g. lowlevel), not by the composer name. This means suggested packages are never found, so the intended load order (like form before lowlevel) is not enforced. I suspect this is why the lowlevel configuration provider registration in the form extension works in v13 but fails in v14 – the load order is no longer accidentally correct. The fix looks easy - check for both the vendor name and the extension key, but I'm confused about how to write a proper test case for this. The existing PackageStatesTest doesn't seem to cover the suggest resolution path in a Composer scenario, and I'm not sure how to simulate the PackageArtifactBuilder behavior inside a functional test. Has anyone already tackled this? Or can someone point me to the right testing pattern? I'd like to submit a Forge issue + patch, but I want to include a test that fails without the fix and passes with it.
Reviews 1
Related issues 1
History 57
-
Stefan Bürk changed category target version <span data-processor="relativetime" data-value="2026-04-11T19:29:59+00:00" > 04/11/26, 19:29 </span>
-
Stefan Bürk changed Related to #108345 Related to #96388 <span data-processor="relativetime" data-value="2026-04-11T19:31:33+00:00" > 04/11/26, 19:31 </span>
-
Stefan Bürk changed
Related to #96388<span data-processor="relativetime" data-value="2026-04-11T19:31:45+00:00" > 04/11/26, 19:31 </span> -
Gerrit Code Review pushed patch set 4 for main to change 93618 status
NewUnder Review <span data-processor="relativetime" data-value="2026-04-11T19:35:01+00:00" > 04/11/26, 19:35 </span> -
Gerrit Code Review pushed patch set 5 for main to change 93618 <span data-processor="relativetime" data-value="2026-04-12T11:05:56+00:00" > 04/12/26, 11:05 </span>
-
Stefan Bürk commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-04-12T19:35:08+00:00" > 04/12/26, 19:35 </span> -
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2026-04-21T11:30:36+00:00" > 04/21/26, 11:30 </span>
Applied in changeset commit:7a364e208c78d1f6e8ca1e3cd7e572e5963a1581.