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-symfony-console/src/terminal.rs | 9 --------- 1 file changed, 9 deletions(-) (limited to 'crates/shirabe-symfony-console/src/terminal.rs') diff --git a/crates/shirabe-symfony-console/src/terminal.rs b/crates/shirabe-symfony-console/src/terminal.rs index 492d8fe2..c7bc82b8 100644 --- a/crates/shirabe-symfony-console/src/terminal.rs +++ b/crates/shirabe-symfony-console/src/terminal.rs @@ -62,11 +62,6 @@ impl Terminal { return stty; } - // skip check if shell_exec function is disabled - if !shirabe_php_shim::function_exists("shell_exec") { - return false; - } - let result = shirabe_php_shim::shell_exec(&format!( "stty 2> {}", if cfg!(windows) { "NUL" } else { "/dev/null" } @@ -195,10 +190,6 @@ impl Terminal { } fn read_from_process(command: &str) -> Option { - if !shirabe_php_shim::function_exists("proc_open") { - return None; - } - // Sparse PHP descriptorspec `[1 => ['pipe', 'w'], 2 => ['pipe', 'w']]`: fd 0 is inherited. let descriptorspec = [ shirabe_php_shim::Descriptor::Inherit, -- cgit v1.3.1-4-g156e