diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-18 04:47:02 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-18 04:47:18 +0900 |
| commit | ced1f9aa91ee36857fec9664c9ccd86ba2310821 (patch) | |
| tree | 630ea3eb3b0e710403669de9ba6a78a421e182a8 /crates/shirabe/src/package/version/version_guesser.rs | |
| parent | 6b7c6cb9a3d1cdf93f261238c1edbc70706a33c7 (diff) | |
| download | php-shirabe-ced1f9aa91ee36857fec9664c9ccd86ba2310821.tar.gz php-shirabe-ced1f9aa91ee36857fec9664c9ccd86ba2310821.tar.zst php-shirabe-ced1f9aa91ee36857fec9664c9ccd86ba2310821.zip | |
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.
Diffstat (limited to 'crates/shirabe/src/package/version/version_guesser.rs')
| -rw-r--r-- | crates/shirabe/src/package/version/version_guesser.rs | 10 |
1 files changed, 3 insertions, 7 deletions
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() { |
