From ad8d455895038165ec33430e4ff3f68bb21ac207 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 10 Aug 2026 04:51:08 +0900 Subject: refactor(autoload): drop the todo!() composerRequire stub The real port lives in shirabe-php-rpc as __shirabe_composer_require(), which runs inside the PHP worker where $GLOBALS and `require` exist. Record that pointer in the module doc instead of keeping a stub that can never be implemented on the Rust side. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe/src/autoload/autoload_generator.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'crates/shirabe/src/autoload') diff --git a/crates/shirabe/src/autoload/autoload_generator.rs b/crates/shirabe/src/autoload/autoload_generator.rs index 835293c4..27a3660e 100644 --- a/crates/shirabe/src/autoload/autoload_generator.rs +++ b/crates/shirabe/src/autoload/autoload_generator.rs @@ -1,3 +1,5 @@ +//! `composerRequire()` is ported to `__shirabe_composer_require()` in shirabe-php-rpc, not here. +//! //! ref: composer/src/Composer/Autoload/AutoloadGenerator.php use crate::autoload::ClassLoader; @@ -2530,13 +2532,6 @@ fn find_top_level_arrow(entry: &str) -> Option { None } -pub fn composer_require(_file_identifier: &str, _file: &str) { - // TODO(phase-c): unportable — depends on the $GLOBALS superglobal - // ($GLOBALS['__composer_autoload_files']) and PHP's `require $file` include - // mechanism (see also ClassLoader's include closure), neither of which is modeled. - todo!() -} - // Helper used by parse_autoloads_type for chained string substitutions. fn str_replace_multi(input: &str, pairs: &[(&str, &str)]) -> String { let mut s = input.to_string(); -- cgit v1.3.1-4-g156e