diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-02 11:57:12 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-02 11:57:12 +0900 |
| commit | 82501a36a0fa6725d656742da42c860e75a89b89 (patch) | |
| tree | 6878658fec4c89e0dea74cbcd2e067d9677a1d20 /crates/mozart | |
| parent | eef83859937cfa140131636f134104cf3549cf5c (diff) | |
| download | php-mozart-82501a36a0fa6725d656742da42c860e75a89b89.tar.gz php-mozart-82501a36a0fa6725d656742da42c860e75a89b89.tar.zst php-mozart-82501a36a0fa6725d656742da42c860e75a89b89.zip | |
feat(resolver): real constraint intersection and replace-aware same-name conflicts
`Pool::what_provides` previously accepted any provide/replace candidate
because `constraints_intersect` returned true unconditionally; the
same-name conflict pass also looked only at canonical names, so a
package replacing another at v1.0.0 was treated as a valid provider for
a v2.0.0 require and could coexist with the replaced package. Implement
interval-based `VersionConstraint::intersects` and index packages by
their `replace` targets (matching Composer's `getNames(false)`) when
generating same-name conflict rules.
Greens 3 installer fixtures: conflict_against_replaced_by_dep_package_problem,
provider_conflicts3, replaced_packages_should_not_be_installed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart')
| -rw-r--r-- | crates/mozart/tests/installer.rs | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index beeb8de..e1bc7a5 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -113,10 +113,7 @@ installer_fixture!( installer_fixture!(circular_dependency_errors); installer_fixture!(conflict_against_provided_by_dep_package_works); installer_fixture!(conflict_against_provided_package_works); -installer_fixture!( - conflict_against_replaced_by_dep_package_problem, - ignore = "mozart binary cannot yet run this fixture" -); +installer_fixture!(conflict_against_replaced_by_dep_package_problem); installer_fixture!( conflict_against_replaced_package_problem, ignore = "mozart binary cannot yet run this fixture" @@ -254,10 +251,7 @@ installer_fixture!( ignore = "mozart binary cannot yet run this fixture" ); installer_fixture!(provider_conflicts2); -installer_fixture!( - provider_conflicts3, - ignore = "mozart binary cannot yet run this fixture" -); +installer_fixture!(provider_conflicts3); installer_fixture!( provider_dev_require_can_satisfy_require, ignore = "mozart binary cannot yet run this fixture" @@ -287,10 +281,7 @@ installer_fixture!( installer_fixture!(replace_priorities); installer_fixture!(replace_range_require_single_version); installer_fixture!(replace_root_require); -installer_fixture!( - replaced_packages_should_not_be_installed, - ignore = "mozart binary cannot yet run this fixture" -); +installer_fixture!(replaced_packages_should_not_be_installed); installer_fixture!( replaced_packages_should_not_be_installed_when_installing_from_lock, ignore = "mozart binary cannot yet run this fixture" |
