-
-
Notifications
You must be signed in to change notification settings - Fork 452
Pass PHPStan for Laravel 12 #2674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…Directives\BaseDirective::$directiveArgs because it might have hooks in a subclass."
@@ -94,11 +94,11 @@ public function testDeleteSubscriber(): void | |||
$subscriber = new DummySubscriber($channel, 'test-topic'); | |||
$redisConnection->expects($this->exactly(3)) | |||
->method('command') | |||
->with(...$this->withConsecutive( | |||
->with(...array_values([...$this->withConsecutive( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
->with(...array_values([...$this->withConsecutive( | |
->with(...array_values($this->withConsecutive( |
spreading once should suffice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It fails with the following error without "double spreading".
Parameter #1 $array of function array_values expects array, iterable<PHPUnit\Framework\Constraint\Callback> given.
🪪 argument.type
✏️ tests/Unit/Subscriptions/Storage/RedisStorageManagerTest.php:97
Co-authored-by: Benedikt Franke <[email protected]>
Thank you, I incorporated parts of your pull request and just released https://github.com/nuwave/lighthouse/releases/tag/v6.54.0. |
Fixes :
PHPDoc tag @return contains generic type PHPUnit\Framework\MockObject\Builder\InvocationMocker but class PHPUnit\Framework\MockObject\Builder\InvocationMocker is not generic.
Method PHPUnit\Framework\MockObject\Builder\InvocationMocker::with() invoked with unpacked array with possibly string key, but it's not allowed because of @no-named-arguments.
Added or updated tests
Documented user facing changes
Updated CHANGELOG.md
Changes
Breaking changes