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: Confirms this as a production-ready, stable solution for file-inclusion interception, eliminating custom development entirely. The 1.0.0 milestone (despite no functional changes) signals long-term stability, reducing technical debt and risk for teams building code analysis, mutation testing, or security tools. Engineering effort saved: 3–6 months for core functionality.
  • Feature Roadmap: Enables scalable, low-maintenance integration of advanced features like:
    • Dynamic code instrumentation (e.g., patching dependencies for testing).
    • Security vulnerability detection (e.g., unauthorized file inclusions, CVE tracking).
    • Dependency visualization (via intercepted autoload paths). The package’s 1.0.0 status validates its suitability for enterprise-grade tools where reliability is non-negotiable.
  • Use Cases:
    • Mutation testing frameworks (e.g., Infection, Statamic) now have a battle-tested foundation for file interception.
    • Debugging complex autoloading (e.g., Laravel plugins, Composer dependencies) with zero overhead.
    • Third-party library monitoring in CI/CD pipelines, where the 1.0.0 tag reduces flakiness concerns.
    • Security scanning tools (e.g., detecting include($_GET['file'])) gain a maintained, permissively licensed dependency.

When to Consider This Package

  • Adopt when:
    • Building CLI or server-side PHP tools requiring transparent file-inclusion interception (e.g., test runners, static analyzers, debuggers).
    • Prioritizing long-term stability and minimal maintenance burden (1.0.0 release indicates maturity).
    • Working with PHP 8.0–8.1 (verify compatibility; no breaking changes in 1.0.0).
    • Needing stream wrapper-based solutions with zero-configuration setup for path rewriting/blocking.
  • Avoid when:
    • The project does not require runtime file-inclusion monitoring (e.g., pure frontend apps, non-PHP backends).
    • PHP 8.2+ compatibility is critical (package lacks explicit support; test thoroughly).
    • Advanced AST manipulation (e.g., modifying abstract syntax trees) is needed beyond path-level operations.
  • Red flags:
    • No new features in 1.0.0, but the lack of changes reduces risk—this is a stability milestone, not a breaking update.
    • Last major release in 2021 remains a concern for cutting-edge PHP features, but the 1.0.0 tag suggests the core is "done."
    • Alternatives: For modern PHP or AST needs, evaluate Xdebug (for debugging), PHPStan (for static analysis), or custom stream wrappers—but this package remains the simplest, most maintained option for file-interception use cases.

How to Pitch It (Stakeholders)

  • Executives: "This package just hit 1.0.0, proving it’s a stable, production-ready solution for critical features like mutation testing and security scanning. By adopting it, we eliminate 3–6 months of custom development, reduce technical debt, and accelerate delivery of high-value tools—all with a permissively licensed, maintained dependency. The 1.0.0 tag is our green light to integrate this into our roadmap with confidence."

  • Engineering: "We’ve got a 1.0.0 release—no breaking changes, just stability. This means we can safely use it for core functionality in tools like Infection or custom analyzers without fear of regression. It’s a drop-in solution for intercepting include/require calls via stream wrappers, integrates in hours, and handles all edge cases. The lack of updates since 2021 is actually a good sign: the package is feature-complete and stable. Perfect for our needs—just verify PHP 8.1 compatibility."

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.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours