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

Infection Static Analysis Plugin Laravel Package

roave/infection-static-analysis-plugin

Runs Psalm static analysis on Infection’s generated mutants to mark type-invalid mutations as killed, boosting mutation scores. Use it as a drop-in wrapper for vendor/bin/infection and pass through all Infection flags plus --psalm-config.

View on GitHub
Deep Wiki
Context7
## Technical Evaluation
**Architecture fit:** The package’s core purpose—augmenting Infection with static analysis—remains theoretically aligned with Laravel’s quality toolchain, but the **forced PHP 8.2 maximum support** (via PHPUnit v13) creates a **hard architectural conflict** with Laravel’s PHP 8.3+ requirement (Laravel 11.x+). The **lack of new features** and **stagnant development** (0 issues resolved, 2 Renovate-driven PRs) further undermine its relevance. The **dependency on Infection v0.32.0** (now compounded by PHPUnit v13’s constraints) introduces **compatibility risks** with Laravel’s evolving testing ecosystem (e.g., Pest, Laravel Shift). The **future-dated release (2025-12-29)** and **abandonware risk** (no human contributors) make this package **unsustainable** for production use in modern Laravel projects.

**Integration feasibility:** The **PHP 8.3 deprecation** is a **blocking breaking change** for Laravel teams, requiring either a **PHP downgrade** or abandonment. The **automated Renovate updates** (e.g., `azjezz/psl` v6, PHPUnit v13) signal **reactive maintenance**, not proactive development. The **absence of contributor activity** and **undocumented breaking changes** (e.g., PHPUnit v13’s migration impact) introduce **high integration risk**. Security risks escalate due to **unpatched dependencies** and **no maintenance roadmap**.

**Technical risk:** **Critical** due to:
- **PHP 8.2 hard limit**: Laravel 11.x+ projects **cannot** use this package without downgrading PHP, violating Laravel’s version support policy.
- **Dependency conflicts**: Infection v0.32.0 + PHPUnit v13 may **break Laravel’s testing stack** (e.g., Pest, Dusk, API testing).
- **Static analysis gaps**: No updates to Psalm/PHPStan support despite `azjezz/psl` v6 bump (potential breaking changes for users).
- **Maintenance collapse**: **No human contributors**; package is effectively **abandoned**.
- **Undocumented risks**: PHPUnit v13’s migration may introduce **subtle failures** (e.g., assertion changes, test listener incompatibilities).

**Key questions:**
1. **Does Infection v0.32.0 + PHPUnit v13 support Laravel’s modern testing features** (e.g., Pest, Dusk, API testing)?
2. **What are the breaking changes in PHPUnit v13** that may affect Infection’s mutation testing or static analysis integration?
3. **How does `azjezz/psl` v6 impact Psalm compatibility** (e.g., new rules, deprecated features)?
4. **Is there a plan to support PHP 8.3+**, or will this package require a Laravel fork?
5. **What is the repository’s end-of-life timeline**? Will future Laravel versions break compatibility entirely?
6. **Are there alternatives** (e.g., standalone Infection + custom static analysis) that avoid PHP downgrades?

---

## Integration Approach
**Stack fit:** The package **explicitly conflicts** with Laravel’s modern stack (PHP 8.3+, Laravel 11.x+). Integration requires:
- **PHP downgrade**: Teams must revert to PHP 8.2 or accept **broken functionality**.
- **Testing stack adjustments**: PHPUnit v13 may require updates to Laravel’s `phpunit.xml` (e.g., new configuration keys, dropped features).
- **Static analysis tooling**: Psalm/PHPStan users must verify `azjezz/psl` v6 compatibility (e.g., new error levels, rule changes).
- **CI/CD**: GitHub Actions or other CI systems must explicitly pin PHP 8.2 if using this package.

**Migration path:**
1. **Pre-integration checks**:
   - **PHP version**: Confirm PHP 8.2 is supported (run `php -v`; Laravel 11.x+ **requires PHP 8.3**).
   - **PHPUnit compatibility**: Audit `phpunit.xml` for v13 breaking changes (e.g., [PHPUnit 13 Upgrade Guide](https://phpunit.readthedocs.io/en/13.0/upgrade-guide.html)).
   - **Static analysis tools**: Test Psalm/PHPStan with `azjezz/psl` v6 for regressions.
2. **Installation** (if proceeding):
   ```bash
   composer require --dev roave/infection-static-analysis-plugin:^1.44.0
  1. Configuration:
    • Downgrade PHP to 8.2 in CI/CD (e.g., GitHub Actions matrix):
      jobs:
        test:
          runs-on: ubuntu-latest
          steps:
            - uses: shivammathur/setup-php@v2
              with:
                php-version: '8.2'
      
    • Update phpunit.xml for PHPUnit v13 (e.g., add <extensions> for new test listeners).
    • Extend Infection config to handle PHPUnit v13-specific mutation testing.
  2. Testing:
    • Run Infection with static analysis and PHPUnit v13:
      ./vendor/bin/infection --show-mutations --static-analysis --phpunit-config=phpunit.xml
      

Compatibility:

  • Breaking changes:
    • PHP 8.3+ unsupported: Laravel 11.x+ projects cannot use this package without downgrading.
    • PHPUnit v13: May break custom test listeners, assertions, or Laravel-specific extensions.
    • Psalm/PHPStan: azjezz/psl v6 may introduce new rules or deprecations.
  • Deprecations: None declared, but PHPUnit v13 drops support for older PHP features (e.g., ReflectionClass::newInstanceArgs).
  • Laravel-specific: Conflicts with Laravel’s Pest testing, Laravel Shift, or custom PHPUnit bootstrapping.

Sequencing:

  1. Phase 0 (Critical): Decide whether to downgrade PHP or abandon this package.
  2. Phase 1: If proceeding, test in a dedicated branch with PHP 8.2 and PHPUnit v13.
  3. Phase 2: Integrate with CI, monitoring for:
    • False positives in static analysis.
    • PHPUnit v13 assertion failures.
    • Infection mutation test regressions.
  4. Phase 3: Document the PHP downgrade as a technical debt item.

Operational Impact

Maintenance:

  • Effort: High due to forced PHP downgrade and PHPUnit v13 migration.
    • Requires parallel maintenance of PHP 8.2 and modern Laravel stacks.
    • No future updates expected beyond Renovate bumps.
  • Dependencies:
    • Infection v0.32.0, PHPUnit v13, and azjezz/psl v6 must be locked to specific versions to avoid breakage.
    • Security patches: None forthcoming; teams must monitor dependencies manually.
  • Updates: Avoid unless critical. The package is effectively abandoned.

Support:

  • Community: Nonexistent. Renovate bot is not a substitute for human maintainers.
  • Documentation: Missing context for PHPUnit v13/Psalm v6 changes. Assume self-service debugging.
  • Workarounds:
    • Option 1: Fork the package and force PHP 8.3+ support.
    • Option 2: Replace with alternatives (e.g., infectionphp/infection + custom static analysis scripts).
    • Option 3: Abandon the plugin and rely on Laravel’s built-in testing + standalone Psalm/PHPStan.

Scaling:

  • Performance: Static analysis + PHPUnit v13 will increase CI runtime significantly.
  • Team adoption: Low due to PHP downgrade requirement and lack of Laravel-specific features.
  • Multi-repo: Centralized Composer config required to enforce PHP 8.2 and dependency locks.

Failure modes:

  1. Critical blocker: PHP 8.3+ projects cannot use this package without downgrading.
  2. CI failures: PHPUnit v13 or Psalm v6 may break existing tests/static analysis.
  3. Security vulnerabilities: Unpatched dependencies (e.g., PHPUnit, Infection) pose risks.
  4. Maintenance debt: Downgrading PHP blocks upgrades, creating long-term technical debt.
  5. False positives: Static analysis may misflag Laravel patterns (e.g., dynamic properties, magic methods).

Ramp-up:

  • Onboarding time: 3–7 days (due to PHP downgrade, PHPUnit migration, and static analysis tuning).
  • Training needed:
    • PHP 8.2 compatibility quirks.
    • PHPUnit v13 assertion changes.
    • Psalm/PHPStan rule adjustments for azjezz/psl v6.
  • Key metrics to track:
    • CI build duration (static analysis overhead).
    • False-positive/negative rates in static analysis.
    • PHP downgrade impact on other tools (e.g., Laravel Sail, Valet
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.
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
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai