From dacc1cb0d7d1397701166571d74580a706c2ce73 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 24 Jul 2026 20:22:47 +0900 Subject: fix(locker): return stability-flags as int, not string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Locker::get_stability_flags returned IndexMap, 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::() 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. --- crates/shirabe/src/installer.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'crates/shirabe/src/installer.rs') diff --git a/crates/shirabe/src/installer.rs b/crates/shirabe/src/installer.rs index 6d943ea7..cfe2432c 100644 --- a/crates/shirabe/src/installer.rs +++ b/crates/shirabe/src/installer.rs @@ -1373,16 +1373,10 @@ impl Installer { .borrow_mut() .get_minimum_stability() .unwrap_or_else(|_| String::new()); - // locker stores stability flags as stringified ints; recover the int form here. stability_flags = self .locker .borrow_mut() .get_stability_flags() - .map(|m| { - m.into_iter() - .map(|(k, v)| (k, v.parse::().unwrap_or(0))) - .collect() - }) .unwrap_or_default(); let mut tmp: IndexMap = IndexMap::new(); -- cgit v1.3.1