nikic/include-interceptor
PHP extension and library to intercept and virtualize include/require. Lets you provide custom file contents, rewrite paths, or instrument included code without touching the filesystem—useful for loaders, build tools, testing, and sandboxing.
Architecture fit: The package operates at the PHP engine level, conflicting with Laravel's Composer-based autoloading and service container patterns. While useful for low-level instrumentation, it's misaligned with Laravel's modern dependency injection and modular design. Best suited for non-Laravel-specific tooling (e.g., legacy systems or custom build pipelines), not standard application logic.
Integration feasibility: Possible but high-effort. Requires initialization in public/index.php before Composer's autoloader loads, disrupting Laravel's standard bootstrap sequence. May interfere with framework internals (e.g., Blade compilation, service registration) and Composer's class loading.
Technical risk: High. Forked package with no updates since 2021; PHP 8.1+ compatibility unverified. Risk of silent failures (e.g., broken includes
How can I help you explore Laravel packages today?