-
Notifications
You must be signed in to change notification settings - Fork 14
Fix some issues reported by mago #856
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
base: 3.20.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,11 +67,10 @@ | |
| ); | ||
| } | ||
|
|
||
| /** @var class-string $commandClass */ | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. phpstan seems to not really pick it up 🤔 |
||
| $commandClass = $type->getClassName(); | ||
|
|
||
| yield new HandlerReference( | ||
| $commandClass, | ||
|
Check failure on line 73 in src/QueryBus/HandlerFinder.php
|
||
| $reflectionMethod->getName(), | ||
| $reflectionMethod->isStatic(), | ||
| ); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,7 @@ | |
|
|
||
| $firstTrace = $error['trace'][0]; | ||
|
|
||
| self::assertIsArray($firstTrace); | ||
|
Check failure on line 46 in tests/Unit/Subscription/ErrorContextTest.php
|
||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. phpstan seems to have a better type knowledge at this place then mago |
||
| self::assertArrayHasKey('file', $firstTrace); | ||
| self::assertSame(__FILE__, $firstTrace['file'] ?? null); | ||
| self::assertArrayHasKey('line', $firstTrace); | ||
|
|
||
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.
this is technically a bc-break, but we are using the spread operator already on the result of
ParameterResolver::resolve, which means it can be only be working with anintas the key. Also, we typed it like that in our concrete implementation https://github.com/patchlevel/event-sourcing/pull/856/changes#diff-fb59bb4d80adcd4ac904abb097ca2b9c8013a263a00117b936eaecc5f4d3a732L22