- Does this package work with Laravel 9+ and PHPUnit 9+?
- No, this package is designed for legacy PHPUnit 4/5 test suites and won’t integrate cleanly with Laravel 9+ or PHPUnit 9+. Modern Laravel apps should upgrade test dependencies instead of relying on compatibility shims.
- How do I install this adapter for an existing Laravel project?
- Run `composer require sanmai/phpunit-legacy-adapter` in your project root. The package provides shims for legacy assertions and APIs, but you’ll need to manually configure PHPUnit to use the adapter in your `phpunit.xml`.
- Will this adapter break my existing PHPUnit 9+ tests?
- No, the adapter is meant to run legacy tests alongside modern ones. However, mixing legacy and modern assertions in the same test suite may cause unpredictable behavior. Test thoroughly in a staging environment.
- What Laravel versions does this package officially support?
- This package has no official Laravel version support listed. It’s designed for PHPUnit compatibility, not Laravel-specific features. Use at your own risk, especially since the package appears abandoned.
- Can I use this to migrate from PHPUnit 5 to 9 without rewriting tests?
- Theoretically, yes—but it’s not a migration tool. It’s a stopgap to run legacy tests. For a clean upgrade, rewrite or refactor tests to use PHPUnit 9+ features instead of relying on compatibility layers.
- Are there security risks using this package in production?
- Yes, significant risks exist. The package has no public repository, no maintenance, and likely unpatched vulnerabilities. Avoid using it in production unless you’ve audited the code yourself for security flaws.
- Does this adapter support PHP 8.1+ features in legacy tests?
- No, the adapter only provides compatibility for PHPUnit 4/5 APIs. Legacy tests running under PHP 8.1+ may still fail due to PHP language changes, not just PHPUnit version differences.
- What alternatives exist for running old PHPUnit tests in modern Laravel?
- Consider rewriting tests for PHPUnit 9+, using Docker to run legacy tests in isolated environments, or maintaining a separate branch with PHPUnit 5.x until tests are modernized.
- How do I configure PHPUnit to use this adapter?
- Add the adapter to your `phpunit.xml` under `<extensions>`, but exact configuration depends on the adapter’s undocumented setup. Since the package is abandoned, expect trial-and-error or reverse-engineering from sparse examples.
- Is this package actively maintained or updated for PHPUnit 10+?
- No, the package is abandoned with no updates. It likely won’t work with PHPUnit 10+ or newer PHP versions. Relying on it risks compatibility failures and security issues.