aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/installer_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-24 20:22:47 +0900
committernsfisis <nsfisis@gmail.com>2026-07-24 20:22:47 +0900
commitdacc1cb0d7d1397701166571d74580a706c2ce73 (patch)
treee8f5269c7a88282ade45d6bd9c5770b8c008fc03 /crates/shirabe/tests/installer_test.rs
parent929b2c938ba8c2b83f360b0ba3a04f64075282f8 (diff)
downloadphp-shirabe-dacc1cb0d7d1397701166571d74580a706c2ce73.tar.gz
php-shirabe-dacc1cb0d7d1397701166571d74580a706c2ce73.tar.zst
php-shirabe-dacc1cb0d7d1397701166571d74580a706c2ce73.zip
fix(locker): return stability-flags as int, not string
Locker::get_stability_flags returned IndexMap<String, String>, converting each value via PhpMixed::as_string(), which only matches the String variant. composer.lock's "stability-flags" values are always JSON integers (BasePackage::STABILITIES), so every flag silently decoded to "" and installer.rs's downstream .parse::<i64>() defaulted it to 0 (stable). This made any locked package pinned via a non-stable stability-flags entry look "unacceptable" during `composer install`, silently dropping it from the solver's pool instead of fixing/requiring it — turning a real dependency conflict into a spurious "lock file needs changes" result. Return i64 directly, matching RootPackageInterface::get_stability_flags and set_lock_data's existing convention for this same PHP array shape.
Diffstat (limited to 'crates/shirabe/tests/installer_test.rs')
-rw-r--r--crates/shirabe/tests/installer_test.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/shirabe/tests/installer_test.rs b/crates/shirabe/tests/installer_test.rs
index c8b47b86..b4dc3811 100644
--- a/crates/shirabe/tests/installer_test.rs
+++ b/crates/shirabe/tests/installer_test.rs
@@ -1331,7 +1331,7 @@ pool_optimizer_test! {
pool_optimizer_conflict_downgrade_nested => "conflict-downgrade-nested.test";
pool_optimizer_conflict_downgrade => "conflict-downgrade.test";
pool_optimizer_conflict_on_root_with_alias_prevents_update_if_not_required => "conflict-on-root-with-alias-prevents-update-if-not-required.test";
- pool_optimizer_conflict_with_alias_in_lock_does_prevents_install => "conflict-with-alias-in-lock-does-prevents-install.test", ignore = "TODO(phase-d): known-failing fixture under COMPOSER_POOL_OPTIMIZER=1";
+ pool_optimizer_conflict_with_alias_in_lock_does_prevents_install => "conflict-with-alias-in-lock-does-prevents-install.test";
pool_optimizer_conflict_with_alias_prevents_update_if_not_required => "conflict-with-alias-prevents-update-if-not-required.test";
pool_optimizer_conflict_with_alias_prevents_update => "conflict-with-alias-prevents-update.test";
pool_optimizer_conflict_with_all_dependencies_option_dont_recommend_to_use_it => "conflict-with-all-dependencies-option-dont-recommend-to-use-it.test";
@@ -1521,7 +1521,7 @@ raw_pool_test! {
raw_pool_conflict_downgrade_nested => "conflict-downgrade-nested.test";
raw_pool_conflict_downgrade => "conflict-downgrade.test";
raw_pool_conflict_on_root_with_alias_prevents_update_if_not_required => "conflict-on-root-with-alias-prevents-update-if-not-required.test";
- raw_pool_conflict_with_alias_in_lock_does_prevents_install => "conflict-with-alias-in-lock-does-prevents-install.test", ignore = "TODO(phase-d): known-failing fixture under COMPOSER_POOL_OPTIMIZER=0";
+ raw_pool_conflict_with_alias_in_lock_does_prevents_install => "conflict-with-alias-in-lock-does-prevents-install.test";
raw_pool_conflict_with_alias_prevents_update_if_not_required => "conflict-with-alias-prevents-update-if-not-required.test";
raw_pool_conflict_with_alias_prevents_update => "conflict-with-alias-prevents-update.test";
raw_pool_conflict_with_all_dependencies_option_dont_recommend_to_use_it => "conflict-with-all-dependencies-option-dont-recommend-to-use-it.test";