#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.