From ca5e92c3fcc8b0edd3a9f016449021f797eff382 Mon Sep 17 00:00:00 2001 From: Imani Manyara Date: Mon, 5 Oct 2026 14:52:56 -0400 Subject: [PATCH] Let PHPStan pass on a Livewire 3 resolve require-dev allows livewire ^3.0||^4.0, but Testable only became generic in Livewire 4.0.0, so a prefer-lowest resolve (v3.8.x) rejects the Testable PHPDoc that v4 needs at level max. Ignore that one identifier in FluentRulesTester only; under v4 the ignore never matches. Verified at prefer-lowest (Livewire 3.8.3) and prefer-stable (4.4.7). --- phpstan.neon.dist | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 63d682e..93a94f3 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -53,6 +53,13 @@ parameters: treatPhpDocTypesAsCertain: false ignoreErrors: + # Livewire 3's Testable is not generic; v4.0.0 added @template TComponent. require-dev allows + # ^3.0||^4.0, so a prefer-lowest resolve (v3.8.x) rejects the Testable PHPDoc that + # v4 needs at this level. Unmatched under v4, hence reportUnmatched: false. + - + identifier: generics.notGeneric + path: src/Testing/FluentRulesTester.php + reportUnmatched: false - identifier: trait.unused reportUnmatched: false