diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-01 22:02:32 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-01 22:02:32 +0900 |
| commit | 8a87adf120d5057b06d0474b293fab079e1ce967 (patch) | |
| tree | 9dc4327244216e9bddf8aace63405e66f1b7d0fb /crates/mozart/tests | |
| parent | baa40325659a44938ad2e9ad6525ea3b3aaacfe2 (diff) | |
| download | php-mozart-8a87adf120d5057b06d0474b293fab079e1ce967.tar.gz php-mozart-8a87adf120d5057b06d0474b293fab079e1ce967.tar.zst php-mozart-8a87adf120d5057b06d0474b293fab079e1ce967.zip | |
fix(install): preserve LockedPackage extra_fields in installed.json
Composer's InstalledFilesystemRepository::write() dumps the full
package via ArrayDumper, so flags like `abandoned` and
`default-branch` (which Mozart parks in LockedPackage::extra_fields)
should round-trip from composer.lock into vendor/composer/installed.json.
locked_to_installed_entry was zeroing the destination's extra_fields,
silently stripping these flags every time installed.json got
rewritten.
Carry the extra_fields map across verbatim. The
install-forces-reinstall-if-abandon-changes installer fixture is
already exit-0 green at the harness layer; this aligns the actual
end-state with Composer's EXPECT-INSTALLED so a future EXPECT-INSTALLED
comparison won't re-flag this gap.
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 314771c..7af07b5 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -242,10 +242,7 @@ installer_fixture!( install_dev_using_dist, ignore = "mozart binary cannot yet run this fixture" ); -installer_fixture!( - install_forces_reinstall_if_abandon_changes, - ignore = "mozart binary cannot yet run this fixture" -); +installer_fixture!(install_forces_reinstall_if_abandon_changes); installer_fixture!( install_from_incomplete_lock, ignore = "mozart binary cannot yet run this fixture" |
