Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Include Interceptor Laravel Package

infection/include-interceptor

PHP stream wrapper that intercepts the file:// protocol to override the content of any included or autoloaded file at runtime. Register a mapping from original file to replacement, enable the interceptor, and includes/file_get_contents load the replacement instead.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs Buy: Eliminates the need to develop custom file-inclusion interception logic from scratch, saving 3-6 months of engineering effort for teams building code analysis or mutation testing tools. The latest release (0.2.5) confirms ongoing maintenance with a critical bug fix, reducing technical debt risks.
  • Feature Roadmap: Accelerates implementation of advanced capabilities like dependency graph visualization, security vulnerability detection (e.g., unauthorized file inclusions), and dynamic code instrumentation without deep PHP internals expertise. The package’s stability (post-bugfix) strengthens its suitability for production-grade tools.
  • Use Cases: Critical for mutation testing frameworks (e.g., Infection), debugging complex autoloading issues, and monitoring third-party library behavior in enterprise applications where runtime file-loading visibility is non-negotiable. The fix in 0.2.5 ensures reliability for high-stakes use cases.

When to Consider This Package

  • Adopt when:
    • Building CLI-based PHP tools requiring transparent, low-overhead monitoring of include/require calls (e.g., test runners, static analyzers), especially where stream wrapper hooks align with existing infrastructure.
    • Prioritizing maintained open-source solutions with recent activity (0.2.5 released in [year], addressing a critical lock constant issue).
  • Avoid when:
    • The project lacks need for runtime file-inclusion interception.
    • Requires compatibility with PHP versions >8.1 (verify package support).
    • Needs advanced AST manipulation beyond path rewriting/blocking.
  • Red flags:
    • While the 2021 last major release is concerning, 0.2.5’s targeted fix suggests responsive maintenance. Monitor for further updates; consider alternatives like Xdebug or custom stream wrappers if active community support or modern PHP feature parity is critical.

How to Pitch It (Stakeholders)

  • Executives: "This package lets us deliver enterprise-grade code analysis features—like security scanning and mutation testing—in weeks instead of months. The latest 0.2.5 release fixes a critical bug (stream wrapper locking), proving ongoing maintenance. It’s a proven, permissively licensed solution that reduces engineering costs while accelerating time-to-market for high-value product capabilities."
  • Engineering: "It’s a battle-tested, zero-configuration tool for intercepting file inclusions via PHP’s stream wrapper system. Integrates in hours to power our test runners with minimal performance impact, handles all core include/require variants, and avoids reinventing the wheel. The recent fix to the lock constant ensures stability for production use—ideal for tools like Infection or custom analyzers."
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport