From 277dc4065d2eb0d6621a6aa56a299a0d2369caf7 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Jun 2026 17:29:53 +0900 Subject: refactor(autoload): drop dead APCu cache from ClassLoader apcu_fetch/apcu_add only ran when apcuPrefix was non-null, but Composer never calls setApcuPrefix on the loaders it instantiates itself; the prefix is only emitted into the generated target-project autoload_real.php. So the cache branches were unreachable in Shirabe's execution paths. Remove the apcu shim and the now-dead lookups. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe-php-shim/src/apcu.rs | 11 ----------- crates/shirabe-php-shim/src/lib.rs | 2 -- 2 files changed, 13 deletions(-) delete mode 100644 crates/shirabe-php-shim/src/apcu.rs (limited to 'crates/shirabe-php-shim') diff --git a/crates/shirabe-php-shim/src/apcu.rs b/crates/shirabe-php-shim/src/apcu.rs deleted file mode 100644 index 699f66e..0000000 --- a/crates/shirabe-php-shim/src/apcu.rs +++ /dev/null @@ -1,11 +0,0 @@ -use crate::PhpMixed; - -pub fn apcu_add(key: &str, var: PhpMixed) -> bool { - let _ = (key, var); - todo!() -} - -pub fn apcu_fetch(key: &str, success: &mut bool) -> PhpMixed { - let _ = (key, success); - todo!() -} diff --git a/crates/shirabe-php-shim/src/lib.rs b/crates/shirabe-php-shim/src/lib.rs index a359275..110dc50 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -1,4 +1,3 @@ -mod apcu; mod array; mod compress; mod curl; @@ -25,7 +24,6 @@ mod url; mod var; mod zip; -pub use apcu::*; pub use array::*; pub use compress::*; pub use curl::*; -- cgit v1.3.1