aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/tests
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-03 13:17:04 +0900
committernsfisis <nsfisis@gmail.com>2026-05-03 13:17:04 +0900
commit87f5bcdc2d0e5fbec3848de3865d6c0d47d623ea (patch)
treec5eca27fa8cafd0fe1d68a38adac7a7cbe6b112c /crates/mozart/tests
parent3c0527aa63574f17c9f372b6187d5690e0cbaff0 (diff)
downloadphp-mozart-87f5bcdc2d0e5fbec3848de3865d6c0d47d623ea.tar.gz
php-mozart-87f5bcdc2d0e5fbec3848de3865d6c0d47d623ea.tar.zst
php-mozart-87f5bcdc2d0e5fbec3848de3865d6c0d47d623ea.zip
fix(policy): prefer replaced original over replacer in cross-name pick
Mirrors the `replaces()` shortcut in Composer's `DefaultPolicy::compareByPriority` (the cross-package `ignoreReplace=false` pass). When two candidates with different names both satisfy a request — say `update a/installed` finds the real `a/installed` package alongside an `a/replacer` declaring `replace: { "a/installed": "..." }` — the policy now picks the replaced original. Without this, the comparison falls through to the package-id tie-break and silently lands on whichever entry was inserted first (here, the replacer with the wrong source ref). Net effect on installer fixtures: `update_dev_ignores_providers` newly green. 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.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs
index b4eb512..75ad3bf 100644
--- a/crates/mozart/tests/installer.rs
+++ b/crates/mozart/tests/installer.rs
@@ -391,7 +391,7 @@ installer_fixture!(
);
installer_fixture!(update_allow_list_with_dependency_conflict, ignore);
installer_fixture!(update_changes_url, ignore);
-installer_fixture!(update_dev_ignores_providers, ignore);
+installer_fixture!(update_dev_ignores_providers);
installer_fixture!(update_dev_packages_updates_repo_url, ignore);
installer_fixture!(update_dev_to_new_ref_picks_up_changes, ignore);
installer_fixture!(update_downgrades_unstable_packages, ignore);