diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-03 22:26:55 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-03 22:26:55 +0900 |
| commit | 2a680f571eae31737525ef96105e929ae420b061 (patch) | |
| tree | 6297d7b76753de69e9934550a739c39459d8a681 /crates/mozart/tests | |
| parent | 55e6f5367bf86d1dc6e99b7492d86c5208dd1f1c (diff) | |
| download | php-mozart-2a680f571eae31737525ef96105e929ae420b061.tar.gz php-mozart-2a680f571eae31737525ef96105e929ae420b061.tar.zst php-mozart-2a680f571eae31737525ef96105e929ae420b061.zip | |
fix(resolver): strip inline #ref and gate alias trace on alias stability
Two related parity gaps surfaced by the `alias-with-reference` fixture:
1. A root require like `dev-main#abcd as 1.0.0` left the SAT-side
constraint as `dev-main#abcd`, which no candidate matched, so
resolution failed before the alias could be materialized. Mirror
Composer's `extractAliases` regex (which captures only the
constraint up to `#`) and `RootPackageLoader::extractReferences`
(which records the hash separately): drop the trailing `#hex` from
the resolver-side constraint and from the alias's left-hand side.
Lockfile generation already pulls the reference back out of the
raw require map for the post-resolve override.
2. `MarkAliasInstalled`'s trace line gated the reference suffix on
the *target* package's stability, so a stable alias like `1.0.0`
pointing at a dev-branch target rendered as `1.0.0 abcd`. Mirror
`AliasPackage::getFullPrettyVersion`: the alias decides on its own
whether to append the suffix based on its own normalized version,
so a stable alias skips the suffix even when the target is dev.
Diffstat (limited to 'crates/mozart/tests')
| -rw-r--r-- | crates/mozart/tests/installer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index 5e285a9..0759177 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -222,7 +222,7 @@ installer_fixture!(alias_in_lock2, ignore); installer_fixture!(alias_on_unloadable_package); installer_fixture!(alias_solver_problems); installer_fixture!(alias_solver_problems2); -installer_fixture!(alias_with_reference, ignore); +installer_fixture!(alias_with_reference); installer_fixture!(aliased_priority); installer_fixture!(aliased_priority_conflicting); installer_fixture!(aliases_with_require_dev, ignore); |
