diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-26 01:16:03 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-26 01:18:09 +0900 |
| commit | 910e124b34c9f05d8b45f73b1f74f5585a6e79b2 (patch) | |
| tree | 5aca89bceea4d8945d8bb3f0cb6ff2b10912efd8 /crates | |
| parent | ae221675090675604411ce460c7053dba8bd8ec4 (diff) | |
| download | php-shirabe-910e124b34c9f05d8b45f73b1f74f5585a6e79b2.tar.gz php-shirabe-910e124b34c9f05d8b45f73b1f74f5585a6e79b2.tar.zst php-shirabe-910e124b34c9f05d8b45f73b1f74f5585a6e79b2.zip | |
feat(php-shim): stub spl_autoload_register/unregister (TODO-flagged)
Compiled Rust never loads a class by name, so the registered callback is dropped.
Return success so callers that register an autoloader during startup can proceed.
Kept the TODO(phase-d) comment: this is an unblocking stub, not a faithful
implementation.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/shirabe-php-shim/src/runtime.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/shirabe-php-shim/src/runtime.rs b/crates/shirabe-php-shim/src/runtime.rs index d051f3d..e002138 100644 --- a/crates/shirabe-php-shim/src/runtime.rs +++ b/crates/shirabe-php-shim/src/runtime.rs @@ -227,14 +227,15 @@ pub fn spl_autoload_register( ) -> bool { let _ = (callback, throw, prepend); // TODO(phase-d): class autoloading has no analogue in compiled Rust (classes are not loaded by - // name at runtime). - todo!() + // name at runtime), so the callback is dropped. Returns success so callers that register an + // autoloader during startup can proceed; this is not a faithful implementation. + true } pub fn spl_autoload_unregister(callback: Box<dyn Fn(&str) -> PhpMixed + Send + Sync>) -> bool { let _ = callback; - // TODO(phase-d): see spl_autoload_register. - todo!() + // TODO(phase-d): see spl_autoload_register; nothing is registered, so this is a no-op stub. + true } static ERROR_REPORTING_LEVEL: std::sync::atomic::AtomicI64 = |
