-
-
Notifications
You must be signed in to change notification settings - Fork 947
Incorrect @var PDOStatement<int,string> contains unresolvable type #14206
Copy link
Copy link
Closed
Labels
Milestone
Description
Bug report
When using a PDOStatement with mode PDO::FETCH_COLUMN I want to be able to type the statement with the appropriate type for the column, e.g. @var PDOStatement<int,string>.
For PHPStan versions up to 2.1.38, this works correctly and no errors are reported. From PHPStan 2.1.39 onwards, this now reports:
PHPDoc tag @var contains unresolvable type.
🪪 varTag.unresolvableType
Code snippet that reproduces the problem
https://phpstan.org/r/0122fc0d-29d4-4aa1-8a57-480dc399d1de
Expected output
No errors found.
Did PHPStan help you today? Did it make you happy in any way?
PHPStan is fantastic at helping me find bugs before they even get committed and pushing me in the direction of writing better code.
Reactions are currently unavailable