aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/tests
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-03 23:56:14 +0900
committernsfisis <nsfisis@gmail.com>2026-05-03 23:56:14 +0900
commitb922f2c7c98496564745435db5cf8d0608a52820 (patch)
treebf8e02c7b9ad59d0c0923366aed76a2a587cc669 /crates/mozart/tests
parent65993be1b2ecdc590f566b2bcfea803d0d08b5e6 (diff)
downloadphp-mozart-b922f2c7c98496564745435db5cf8d0608a52820.tar.gz
php-mozart-b922f2c7c98496564745435db5cf8d0608a52820.tar.zst
php-mozart-b922f2c7c98496564745435db5cf8d0608a52820.zip
fix(resolver): extract aliases from complex root-require constraints
Mirror Composer's RootPackageLoader::extractAliases regex so root requires like `1.*||dev-feature-foo as 1.0.2||^2` and `dev-feature-foo, dev-feature-foo as 1.0.2` get every `<X> as <Y>` clause stripped in place and recorded as a separate root alias entry. The previous single-atom strip left the alias inline, where the parser then took the RIGHT side per atom and never matched the actual dev-branch package. Also fix split_and so a comma-separated AND group like `dev-foo, dev-bar` splits into two atoms. The space-only operator-glue heuristic was collapsing it into a single atom because neither half starts with an operator or digit. Splitting on commas first preserves the unambiguous separator while keeping `>= 1.0.0` glued within each comma-part. 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.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs
index 00964d7..728b820 100644
--- a/crates/mozart/tests/installer.rs
+++ b/crates/mozart/tests/installer.rs
@@ -244,7 +244,7 @@ macro_rules! installer_fixture {
}
installer_fixture!(abandoned_listed);
-installer_fixture!(alias_in_complex_constraints, ignore);
+installer_fixture!(alias_in_complex_constraints);
installer_fixture!(alias_in_lock);
installer_fixture!(alias_in_lock2);
installer_fixture!(alias_on_unloadable_package);