aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/autoload
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-10 04:51:08 +0900
committernsfisis <nsfisis@gmail.com>2026-08-10 04:51:08 +0900
commitad8d455895038165ec33430e4ff3f68bb21ac207 (patch)
treeb7914f46386c46524d37b6a7555eea7e7d7b357b /crates/shirabe/src/autoload
parentf1bf9d50634899aad30dfb60fdb1e0a7ab305229 (diff)
downloadphp-shirabe-ad8d455895038165ec33430e4ff3f68bb21ac207.tar.gz
php-shirabe-ad8d455895038165ec33430e4ff3f68bb21ac207.tar.zst
php-shirabe-ad8d455895038165ec33430e4ff3f68bb21ac207.zip
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/autoload')
-rw-r--r--crates/shirabe/src/autoload/autoload_generator.rs9
1 files changed, 2 insertions, 7 deletions
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<usize> {
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();