From 6066087795efe76357f929bc1148deb1835cbbae Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 10 Aug 2026 08:45:18 +0900 Subject: refactor(autoload): resolve include_path in the PHP worker ClassLoader's PSR-0 include_path lookup went through a shim stub that could only have answered with an invented include_path: the setting is PHP runtime state, and the one thing that turns useIncludePath on is the generated autoload_real.php, whose set_include_path() call runs inside the worker. Ask the worker instead, so the search sees the same path list as the process that ends up including the resolved file. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe-php-shim/src/stream.rs | 7 ------- 1 file changed, 7 deletions(-) (limited to 'crates/shirabe-php-shim/src') diff --git a/crates/shirabe-php-shim/src/stream.rs b/crates/shirabe-php-shim/src/stream.rs index b699b0ae..6ecf80f5 100644 --- a/crates/shirabe-php-shim/src/stream.rs +++ b/crates/shirabe-php-shim/src/stream.rs @@ -13,13 +13,6 @@ pub fn stream_get_contents(stream: &PhpResource) -> Option { stream_read_remaining(stream, None) } -pub fn stream_resolve_include_path(filename: impl AsRef) -> Option { - // TODO(phase-c): resolution searches the `include_path` ini setting, which the shim does not - // model; checking only the current directory would silently miss configured include paths. - let _ = filename.as_ref(); - todo!() -} - // Reads from the stream's current position: all remaining bytes, or up to `max_length` when given // (a negative max means "until end"). fn stream_read_remaining(stream: &PhpResource, max_length: Option) -> Option { -- cgit v1.3.1-4-g156e