aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart-class-map-generator/src/lib.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-01 21:55:09 +0900
committernsfisis <nsfisis@gmail.com>2026-05-01 21:55:09 +0900
commitbaa40325659a44938ad2e9ad6525ea3b3aaacfe2 (patch)
treeb2d69a005c79c4d272443602235afcf5d602b062 /crates/mozart-class-map-generator/src/lib.rs
parent740eb5b55804134c1977dd39cd8170e2fa615d35 (diff)
downloadphp-mozart-baa40325659a44938ad2e9ad6525ea3b3aaacfe2.tar.gz
php-mozart-baa40325659a44938ad2e9ad6525ea3b3aaacfe2.tar.zst
php-mozart-baa40325659a44938ad2e9ad6525ea3b3aaacfe2.zip
fix(registry): accept composer.lock without content-hash
Composer's `Locker` treats `content-hash` as optional with BC support (see Locker::isLocked() / isFresh() lines 142-147): if a lock predates the field — or, in the case of installer fixtures, deliberately omits it — Composer simply considers the lock "not fresh" against any composer.json. Mozart's deserializer was strict, rejecting the lock with `missing field content-hash` before any of the install-time checks could run. Default the field to empty via `#[serde(default)]`. With an empty hash, `is_fresh()` returns false (matching Composer's BC behavior, so the freshness warning still fires) and downstream code that overwrites `content_hash` continues to work unchanged. Closes the parsing barrier exercised by the updating-dev-from-lock-removes-old-deps installer fixture. Note: matching Composer's exact operations trace ("Upgrading a/devpackage …", alias-removal lines) requires a `compute_operations` that compares package source references — out of scope for this change and tracked in .ken/test_design.md §7.2 under "EXPECT (operations trace) 比較". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart-class-map-generator/src/lib.rs')
0 files changed, 0 insertions, 0 deletions