diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-02 11:31:59 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-02 11:31:59 +0900 |
| commit | eef83859937cfa140131636f134104cf3549cf5c (patch) | |
| tree | 0f1538fa4ecda9dc4e41a62875173efc1a45ac03 /Cargo.toml | |
| parent | b216124157b69edc7330291214a6043c555f0ade (diff) | |
| download | php-mozart-eef83859937cfa140131636f134104cf3549cf5c.tar.gz php-mozart-eef83859937cfa140131636f134104cf3549cf5c.tar.zst php-mozart-eef83859937cfa140131636f134104cf3549cf5c.zip | |
fix(update): normalize locked version to 4-segment form on partial pin
`apply_partial_update` and `apply_patch_only` both pinned non-listed
packages back to the lock by copying `LockedPackage.version_normalized`
verbatim, falling back to the raw pretty `version` when the field was
missing. Lock files written by Composer always include the field, but
hand-written fixtures (every `--LOCK--` block in the installer
fixtures, in particular) typically only carry `version`. The 3-segment
form ("1.0.0") then leaked into the resolved package, where
`LockFileGenerationRequest::inline_lookup` compares against the
4-segment normalizer output ("1.0.0.0") and missed inline `type:
package` entries — triggering a Packagist fetch (and proxy-blocked
failure under the test harness) for a package that should never need
one.
Extract a single `locked_version_normalized` helper that runs the
pretty version through `mozart_semver::Version::parse(...).to_string()`
when the lock omits `version_normalized`, and use it from both call
sites. Mirrors `packagist_to_pool_inputs` and `inline_lookup`, which
already produce the 4-segment form.
Unblocks 26 installer fixtures: the entire update-allow-list cluster
(16, minus the alias subcase), five partial-update cases, and five
others (full-update-minimal-changes, load-replaced-package-if-replacer-dropped,
remove-deletes-unused-deps, remove-does-nothing-if-removal-requires-update-of-dep,
update-changes-url). Scoreboard: 107 → 133 of 187 installer fixtures.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'Cargo.toml')
0 files changed, 0 insertions, 0 deletions
