diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-06 06:25:10 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-06 06:25:30 +0900 |
| commit | 791ef1cd465597ff43dab4216c4b00e9e4160da8 (patch) | |
| tree | ec6c3bc45f81576146325350faa6dcea638987b4 /crates/shirabe/src/repository/platform_repository.rs | |
| parent | a86bbd67954f7bbc38bb09138edb335d82666526 (diff) | |
| download | php-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/repository/platform_repository.rs')
| -rw-r--r-- | crates/shirabe/src/repository/platform_repository.rs | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/crates/shirabe/src/repository/platform_repository.rs b/crates/shirabe/src/repository/platform_repository.rs index f0d8b46e..3f22954c 100644 --- a/crates/shirabe/src/repository/platform_repository.rs +++ b/crates/shirabe/src/repository/platform_repository.rs @@ -23,8 +23,8 @@ use shirabe_external_packages::composer::pcre::{CaptureKey, Preg}; use shirabe_external_packages::composer::xdebug_handler::XdebugHandler; use shirabe_php_shim::{ InvalidArgumentException, PhpMixed, UnexpectedValueException, array_map_str_fn, - array_slice_strs, explode, get_class, implode, in_array, is_string, php_regex, str_replace, - str_starts_with, strpos, strtolower, var_export, + array_slice_strs, explode, get_class, implode, in_array_strict, is_string, php_regex, + str_replace, str_starts_with, strpos, strtolower, var_export, }; use shirabe_semver::constraint::SimpleConstraint; use std::sync::{LazyLock, Mutex}; @@ -322,16 +322,12 @@ impl PlatformRepository { } // Check for Xdebug in a restarted process - if !in_array( - PhpMixed::String("xdebug".to_string()), - &PhpMixed::Array( - loaded_extensions - .iter() - .enumerate() - .map(|(i, s)| (i.to_string(), PhpMixed::String(s.clone()))) - .collect(), - ), - true, + if !in_array_strict( + "xdebug".to_string(), + &loaded_extensions + .iter() + .map(|s| PhpMixed::String(s.clone())) + .collect::<Vec<_>>(), ) && let Some(xdebug_pretty_version) = XdebugHandler::get_skipped_version() && !xdebug_pretty_version.is_empty() { |
