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/src/autoload/class_loader.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/shirabe') diff --git a/crates/shirabe/src/autoload/class_loader.rs b/crates/shirabe/src/autoload/class_loader.rs index 023812ce..2d888ecf 100644 --- a/crates/shirabe/src/autoload/class_loader.rs +++ b/crates/shirabe/src/autoload/class_loader.rs @@ -1,9 +1,10 @@ //! ref: composer/src/Composer/Autoload/ClassLoader.php use indexmap::IndexMap; +use shirabe_php_rpc::stream_resolve_include_path; use shirabe_php_shim::{ InvalidArgumentException, PhpMixed, defined, file_exists, include_file, spl_autoload_register, - spl_autoload_unregister, stream_resolve_include_path, strlen, strpos, strrpos, strtr, substr, + spl_autoload_unregister, strlen, strpos, strrpos, strtr, substr, }; use std::sync::{LazyLock, Mutex}; -- cgit v1.3.1-4-g156e