wyrihaximus/test-utilities
Test utilities for api-clients packages, providing a PHPStan extension so test classes can extend WyriHaximus\TestUtilities\TestCase, with automatic registration via phpstan/extension-installer or manual inclusion of extension.neon.
RefreshDatabase, DatabaseMigrations) only through inheritance or composition in your own base test case.composer require --dev wyrihaximus/test-utilities plus extending the provided TestCase remains the whole install story. No service provider, no config publish, no runtime footprint.DatabaseMigrations / RefreshDatabase via a project-local trait remains mandatory.Artisan::call()-style helpers; wrappers remain your responsibility.MakesHttpRequests and assertion helpers are not covered.wyrihaximus/phpstan-rules-wrapper constraint moved to ^14.10.1 (from effectively ^14.9.0 mid-cycle). Expect a larger and stricter ruleset than Laravel Shift's default PHPStan rules; validate baseline output before enabling in CI as a blocking gate.replace Overrides Are Not Recommended: The previous assessment sketched a composer.json replace block to force PHPUnit 9.5.22. This is not a viable long-term integration strategy—it defeats the package's own version guards and will silently break at the next constraint bump. Downgrade that guidance to "avoid"; prefer selecting a package major that matches your Laravel/PHPUnit line, or wait.phpunit/phpunit to ^13.4.1. The prior assessment flagged PHPUnit 12.x as a stretch against Laravel 10/11; the package is now a full major beyond that.require-dev style) rather than a hard require, Composer will refuse to co-install.wyrihaximus/qa-tooling-wrapper ^2.4.0 and wyrihaximus/makefiles ^0.15.2 pull their own Symfony/tooling constraints. These are the vectors most likely to collide with Laravel's Symfony 7.x pins (the previous assessment noted Symfony 8.x exposure at 12.x; the risk has not decreased).wyrihaximus/phpstan-rules-wrapper moves on its own fast cadence (three bumps inside this single release: 14.9.0 → 14.10.0 → 14.10.1). Each bump can change rule severity and produce new CI failures without any change to this package's own code.renovate-runner[bot], including one autoclosed PR. This is a bot-only maintenance cadence: no human review trail for integration concerns, no roadmap, no Laravel-specific triage. Weigh this heavily if you intend to standardize on the package across teams.TestCase traits (HttpTests, FeatureTests, InteractsWithDatabase) will need to be re-mixed into a project-local base class.phpunit/phpunit ^13.4.1 a hard require or a scoped dev constraint? If hard, no supported Laravel LTS version can co-install without overrides—this is a go/no-go question.qa-tooling-wrapper ^2.4.0 / makefiles ^0.15.2 transitively require Symfony 8.x, and does that conflict with your Laravel's Symfony pin?storage_path() / public_path()?phpstan-rules-wrapper ^14.10.1 is applied to an existing Laravel codebase (expected: substantially more than Shift's baseline)?@mixin / @method conventions on models and facades?TestCase from a project-local base class that also composes Laravel's traits:
use WyriHaximus\TestUtilities\TestCase as PackageTestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
abstract class TestCase extends PackageTestCase
{
use CreatesApplication;
use RefreshDatabase;
}
phpstan.neon and run a baseline capture before making it blocking. Expect an initial triage pass.WyriHaximus\TestUtilities\RectorConfig rather than replacing rector.php wholesale, so Laravel-specific rulesets survive.--dry-run across the codebase and diff the proposed changes before enabling.composer require --dev wyrihaximus/test-utilities:^14.5 --dry-run.replace overrides to force it.TestCase for new test files only; leave legacy suites on Laravel's stock TestCase.--dry-run per module.RefreshDatabase/DatabaseMigrations.Artisan::call() added to the local base case.MakesHttpRequests at the local base class level."wyrihaximus/test-utilities": "14.5.0") rather than a caret range. Given a bot-driven release stream with an explicit PHPUnit 13 floor, a caret range is an uncontrolled upgrade vector.composer.lock as the contract; avoid replace hacks to force PHPUnit downgrades.--dry-run first.CONTRIBUTING.md.result-cache and tune --memory-limit.TestCase as the single entry point so developers never extend the package class directly.| Risk | Impact | Mitigation |
|---|---|---|
| PHPUnit 13 floor blocks co-install with Laravel LTS | Adoption blocked entirely | Phase 0 --dry-run gate; pin to last compatible major; do not replace |
| Transitive Symfony 8.x conflict via qa-tooling-wrapper | Composer resolution failure | Lockfile as contract; test resolution before merging Renovate PRs |
| PHPStan rules-wrapper minor bump changes severities | Sudden CI failures on unchanged code | Exact pinning; report-only mode for new rules; baseline file |
| Rector docblock-to-attribute conversion breaks Laravel PHPDoc conventions | Broken IDE/static-analysis metadata on models/facades | --dry-run diff review; per-module rollout |
| Package pins a new PHPUnit major ahead of Laravel again | Repeat of this exact situation | Exact pin + documented upgrade policy; watch release notes for phpunit/phpunit bumps |
| Maintainer bus factor / no human triage | No upstream fix for Laravel-specific gaps | Private fork policy; keep Laravel traits in project-local code, not upstream |
| CI pipeline slowdown from Rector + PHPStan | Longer feedback loops | Parallelize, cache, scope Rector per module |
TestCase.How can I help you explore Laravel packages today?