aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/update_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-06 06:25:10 +0900
committernsfisis <nsfisis@gmail.com>2026-08-06 06:25:30 +0900
commit791ef1cd465597ff43dab4216c4b00e9e4160da8 (patch)
treeec6c3bc45f81576146325350faa6dcea638987b4 /crates/shirabe/src/command/update_command.rs
parenta86bbd67954f7bbc38bb09138edb335d82666526 (diff)
downloadphp-shirabe-791ef1cd465597ff43dab4216c4b00e9e4160da8.tar.gz
php-shirabe-791ef1cd465597ff43dab4216c4b00e9e4160da8.tar.zst
php-shirabe-791ef1cd465597ff43dab4216c4b00e9e4160da8.zip
refactor(php-shim): split in_array into strict and loose variants
Diffstat (limited to 'crates/shirabe/src/command/update_command.rs')
-rw-r--r--crates/shirabe/src/command/update_command.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/shirabe/src/command/update_command.rs b/crates/shirabe/src/command/update_command.rs
index e5602763..e9bf34a9 100644
--- a/crates/shirabe/src/command/update_command.rs
+++ b/crates/shirabe/src/command/update_command.rs
@@ -34,7 +34,7 @@ use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{
InvalidArgumentException, PhpMixed, RuntimeException, array_filter, array_intersect,
- array_keys, array_merge_map, array_search_in_vec, impl_php_class, in_array, php_regex,
+ array_keys, array_merge_map, array_search_in_vec, impl_php_class, in_array_strict, php_regex,
strtolower,
};
use shirabe_semver::Intervals;
@@ -334,14 +334,13 @@ impl Command for UpdateCommand {
// the arguments lock/nothing/mirrors are not package names but trigger a mirror update instead
// they are further mutually exclusive with listing actual package names
let filtered_packages: Vec<String> = array_filter(&packages, |package: &String| -> bool {
- !in_array(
- PhpMixed::String(package.clone()),
- &PhpMixed::List(vec![
+ !in_array_strict(
+ package.clone(),
+ &[
PhpMixed::String("lock".to_string()),
PhpMixed::String("nothing".to_string()),
PhpMixed::String("mirrors".to_string()),
- ]),
- true,
+ ],
)
});
let update_mirrors = input