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
@phpstan-assert-if-true miss when implements #9123
Comments
@snapshotpl After the latest push in 1.11.x, PHPStan now reports different result with your code snippet: @@ @@
+ 3: Declare strict_types must be the very first statement.
32: Dumped type: T of Event (class EventListener, parameter)
51: Dumped type: MyEvent Full report
|
@snapshotpl After the latest push in 1.11.x, PHPStan now reports different result with your code snippet: @@ @@
+ 3: Declare strict_types must be the very first statement.
32: Dumped type: T of Event (class EventListener, parameter)
+37: Cannot declare class Implementation because the name is already in use.
51: Dumped type: MyEvent Full report
|
I fixed a little a playground example https://phpstan.org/r/95d2b8a3-4a73-4a82-89ed-70ebef42914a |
Closes phpstan/phpstan#10037 Closes phpstan/phpstan#9123
Fixed: phpstan/phpstan-src#2909 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
When use
@phpstan-assert-if-true
in interface with template and implementation define type, then@phpstan-assert-if-true
doesn't respect given type.Code snippet that reproduces the problem
https://phpstan.org/r/b546d60e-e115-443a-9dbc-1d5cb757d2de
Expected output
Event
type in both casesThe text was updated successfully, but these errors were encountered: