From ced1f9aa91ee36857fec9664c9ccd86ba2310821 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 18 Aug 2026 04:47:02 +0900 Subject: refactor(function-exists): drop checks for always-present capabilities function_exists() returns false in PHP when a function is blocked by disable_functions, when its extension is not compiled in, or when the PHP version predates it. None of those apply to a native binary. --- crates/shirabe/src/package/version/version_guesser.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'crates/shirabe/src/package/version') diff --git a/crates/shirabe/src/package/version/version_guesser.rs b/crates/shirabe/src/package/version/version_guesser.rs index 3c47d5b2..38c4f0a3 100644 --- a/crates/shirabe/src/package/version/version_guesser.rs +++ b/crates/shirabe/src/package/version/version_guesser.rs @@ -13,9 +13,9 @@ use crate::util::Svn as SvnUtil; use crate::util::sync_executor; use indexmap::IndexMap; use shirabe_php_shim::{ - PhpMixed, RuntimeException, array_keys, array_map, array_merge, empty, function_exists, - implode, is_string, json_encode, php_regex, preg_is_match, preg_match, preg_quote, - preg_replace, str_replace, strlen, strnatcasecmp, strpos, substr, trim, usort, + PhpMixed, RuntimeException, array_keys, array_map, array_merge, empty, implode, is_string, + json_encode, php_regex, preg_is_match, preg_match, preg_quote, preg_replace, str_replace, + strlen, strnatcasecmp, strpos, substr, trim, usort, }; /// Seam over the parts of [`VersionGuesser`] that consumers depend on, so they can be exercised @@ -104,10 +104,6 @@ impl VersionGuesser { return Ok(None); } - if !function_exists("proc_open") { - return Ok(None); - } - // bypass version guessing in bash completions as it takes time to create // new processes and the root version is usually not that important if Platform::is_input_completion_process() { -- cgit v1.3.1-4-g156e