From 087865ef50283350a3cc74a5363ba44fa7dbe5c5 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 20 Jul 2026 08:13:12 +0900 Subject: feat(php-rpc): implement phpinfo() capture over RPC DiagnoseCommand::check_platform needed phpinfo() output but shirabe-php-shim's ob_start()/phpinfo()/ob_get_clean() are unmodeled todo!()s. Add a phpinfo dispatch entry to the PHP worker (capturing output the same way extension_info already does) and a get_phpinfo() wrapper, then switch check_platform to call it directly. This unblocks the phpinfo-related panic in diagnose; the ignored tests now hit a separate RefCell double-borrow bug in check_http, so their ignore reasons are updated to point at that instead. --- crates/shirabe-php-rpc/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'crates/shirabe-php-rpc/src') diff --git a/crates/shirabe-php-rpc/src/lib.rs b/crates/shirabe-php-rpc/src/lib.rs index d5d1dafa..9ba02629 100644 --- a/crates/shirabe-php-rpc/src/lib.rs +++ b/crates/shirabe-php-rpc/src/lib.rs @@ -58,6 +58,14 @@ pub fn get_extension_info(name: &str) -> String { } } +/// PHP `phpinfo($what)` output, captured via `ob_start()`/`ob_get_clean()`. +pub fn get_phpinfo(what: i64) -> String { + match call("phpinfo", &what.to_string()) { + PhpMixed::String(s) => s, + other => panic!("PHP RPC: `phpinfo` did not return a string: {other:?}"), + } +} + /// PHP `phpversion($extension)`. pub fn phpversion(extension: &str) -> Option { match call("phpversion", extension) { -- cgit v1.3.1