aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/tests/installer.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-03 22:39:17 +0900
committernsfisis <nsfisis@gmail.com>2026-05-03 22:39:17 +0900
commitcccdce42f6eb5c21179bf7b2fbd482a7d29c3b9d (patch)
tree70911b19ae54a2771fbd20411f5f217e6930f38a /crates/mozart/tests/installer.rs
parent94d217dc9a6a23b6bcd695b776a34ac0db0ce539 (diff)
downloadphp-mozart-cccdce42f6eb5c21179bf7b2fbd482a7d29c3b9d.tar.gz
php-mozart-cccdce42f6eb5c21179bf7b2fbd482a7d29c3b9d.tar.zst
php-mozart-cccdce42f6eb5c21179bf7b2fbd482a7d29c3b9d.zip
fix(update): wire up the bare-keyword mirrors mode
`update lock`, `update nothing`, and `update mirrors` were treated as ordinary full updates: the resolver picked the highest matching version of every root require and the install step rewrote refs from the repository, masquerading transport metadata refreshes as content changes (and accepting brand-new root requires the lock had never seen). Mirror Composer's `setUpdateMirrors(true)` flow: - Detect the bare-keyword form and skip composer.json's require / require-dev entirely; require each locked package by exact version instead. This drops fresh root requires Mozart shouldn't yet honor and pins existing ones to their lock version. - After lockfile generation, walk each new entry and copy the OLD lock's source/dist reference back when the source/dist *type* matches, mirroring `LockTransaction::updateMirrorAndUrls`. URL and mirrors update; ref stays put — so a repo rename or mirror flip emits no Update operation, but a real type change (`hg` → `git`) still does.
Diffstat (limited to 'crates/mozart/tests/installer.rs')
-rw-r--r--crates/mozart/tests/installer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs
index 189a7c9..f304b72 100644
--- a/crates/mozart/tests/installer.rs
+++ b/crates/mozart/tests/installer.rs
@@ -388,8 +388,8 @@ installer_fixture!(update_installed_alias);
installer_fixture!(update_installed_alias_dry_run);
installer_fixture!(update_installed_reference);
installer_fixture!(update_installed_reference_dry_run);
-installer_fixture!(update_mirrors_changes_url, ignore);
-installer_fixture!(update_mirrors_fails_with_new_req, ignore);
+installer_fixture!(update_mirrors_changes_url);
+installer_fixture!(update_mirrors_fails_with_new_req);
installer_fixture!(update_no_dev_still_resolves_dev);
installer_fixture!(update_no_install);
installer_fixture!(update_package_present_in_lock_but_not_at_all_in_remote);