diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-03 23:44:47 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-03 23:44:47 +0900 |
| commit | 65993be1b2ecdc590f566b2bcfea803d0d08b5e6 (patch) | |
| tree | 14169c8e5c2636264438c7c44935265f00385bc2 /crates/mozart/tests | |
| parent | e37b12d6e2d95b4d3924859732513e125fc552e0 (diff) | |
| download | php-mozart-65993be1b2ecdc590f566b2bcfea803d0d08b5e6.tar.gz php-mozart-65993be1b2ecdc590f566b2bcfea803d0d08b5e6.tar.zst php-mozart-65993be1b2ecdc590f566b2bcfea803d0d08b5e6.zip | |
fix(resolver): cap inline package loads by root require constraint
Mirror Composer's PoolBuilder::markPackageNameForLoading: when the root
requires a name with a version constraint, loads of that name (seed and
transitive) are filtered down to candidates whose own version (or any
emitted branch-alias version) satisfies the constraint. Without this,
the actual package at a non-matching version slips into the pool
alongside a provider satisfying the root require, masking what should
be a conflict (provider-gets-picked-together-with-other-version-of-
provided-conflict.test).
Also restore the Composer v1 compat path in inline_package: when the
JSON sets version_normalized to the legacy 9999999-dev sentinel,
re-normalize from the human-readable version field so a root require
for `dev-master` matches the loaded package.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/tests')
| -rw-r--r-- | crates/mozart/tests/installer.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index d22f2a0..00964d7 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -338,10 +338,7 @@ installer_fixture!(provider_conflicts2); installer_fixture!(provider_conflicts3); installer_fixture!(provider_dev_require_can_satisfy_require); installer_fixture!(provider_gets_picked_together_with_other_version_of_provided); -installer_fixture!( - provider_gets_picked_together_with_other_version_of_provided_conflict, - ignore -); +installer_fixture!(provider_gets_picked_together_with_other_version_of_provided_conflict); installer_fixture!(provider_gets_picked_together_with_other_version_of_provided_indirect); installer_fixture!(provider_packages_can_be_installed_if_selected); installer_fixture!(provider_packages_can_be_installed_together_with_provided_if_both_installable); |
