Weave 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
Abstract Testframework Adapter

Abstract Testframework Adapter Laravel Package

infection/abstract-testframework-adapter

Shared abstractions for Infection test framework adapters. Provides the TestFrameworkAdapter and TestFrameworkAdapterFactory interfaces so custom adapters can translate Infection's test execution requests into target framework commands and return collected test locations.

View on GitHub
Deep Wiki
Context7

Infection Abstract Test Framework Adapter

Frequently asked questions about Abstract Testframework Adapter
How does this package help Laravel projects using Infection for mutation testing?
This package provides a standardized abstraction layer for Infection adapters, ensuring consistent test framework integration (PHPUnit, Pest, etc.). For Laravel projects, it reduces boilerplate when building custom adapters and improves reliability by handling syntax errors uniformly across test frameworks. It’s particularly useful if you’re extending Infection for Laravel-specific testing workflows.
Can I use this package directly in my Laravel app, or is it only for adapter developers?
This package is **not** meant for direct use in Laravel apps—it’s a dependency for Infection adapter developers. If you’re using Infection with PHPUnit or Pest, you’ll rely on pre-built adapters (like `infection/phpspec-adapter`) that already depend on this package. Only install it if you’re building a custom adapter for Infection.
Does this package support Pest 2.0+ or PHPUnit 10+ (attribute-based tests) in Laravel?
The package includes a new `HasSyntaxErrorDetection` interface (0.5.0) to handle syntax errors, but **no official guarantees exist for Pest 2.0+ or PHPUnit 10+**. If you’re using these frameworks, test the adapter thoroughly or extend it manually. Check the [Infection docs](https://infection.gith.io/) for framework-specific notes.
What Laravel PHP versions does this package support, and will it work with Laravel 10+?
This package supports **PHP 8.0+**, but **PHP 8.2+ compatibility is untested**. Since Laravel 10+ defaults to PHP 8.2+, verify compatibility by testing with your Laravel app’s PHP version. If issues arise, check the [Infection GitHub](https://github.com/infection/infection) for updates or file an issue.
How do I build a custom Infection adapter for Laravel using this package?
Extend `TestFrameworkAdapter` and `TestFrameworkAdapterFactory` from this package. Implement methods like `runTests()` and `hasSyntaxError()` to bridge Infection with your Laravel test runner (e.g., Pest or PHPUnit). Follow the [Infection adapter guide](https://infection.gith.io/) and review existing adapters (e.g., `infection/phpspec-adapter`) for examples.
Is this package actively maintained, or should I avoid it for production Laravel apps?
Maintenance is **low-risk for now**, but **not actively developed**. The last major release (0.5.0) was in 2024, with no recent commits. If you’re using Infection in production, monitor the [Infection GitHub](https://github.com/infection/infection) for updates—this package’s future depends on Infection’s roadmap. Consider forking or contributing if critical features are missing.
Will this package break if Infection updates to v2.0+?
There’s a **moderate risk of breaking changes** if Infection evolves without syncing this package. Since it’s an abstraction layer, updates should be backward-compatible, but test thoroughly after Infection upgrades. Check the [Infection changelog](https://github.com/infection/infection/releases) for adapter-related changes.
Are there security risks using this package in Laravel CI/CD pipelines?
No **direct security risks** are documented, but transitive dependencies (e.g., `phpunit/phpunit`) may introduce vulnerabilities. Run `composer audit` to check for known issues. The package lacks SBOM or vulnerability scanning, so manually audit dependencies if security is critical. Report issues via the [Infection GitHub](https://github.com/infection/infection).
Should I use this package or build custom syntax error detection for Laravel tests?
Use this package **only if you’re building an Infection adapter**. For custom syntax error detection in Laravel tests, consider framework-specific solutions (e.g., Pest’s built-in error handling or PHPUnit’s `InvalidArgumentException`). This package’s `HasSyntaxErrorDetection` is optimized for Infection’s workflow, not standalone Laravel apps.
Are there Laravel-specific Infection adapters that use this package?
No **official Laravel-specific adapters** exist yet, but you can build one using this package. Existing adapters (e.g., for PHPUnit/Pest) are framework-agnostic. If you create a Laravel adapter, share it with the community via the [Infection Discord](https://discord.gg/ZUmyHTJ) or GitHub.
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.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator