Bug report
This code is query builder using php doc generics.
psalm, mago is correct but phpstan is show reverse message.
I tested Mago and Psalm the results came out correctly, but phpstan's error message is based on the first parameter.
Code snippet that reproduces the problem
https://phpstan.org/r/7b51d8a5-3deb-4aee-a0cb-10955b448f54
Expected output
I expect messge: Parameter #1 $column of method Builder::where() expects Column IntColumn, <'test_string_value'> given.
sorry poor expect message
I explained it in detail in the comment below.
- modified expect 2026-june-27:
But Phpstan print this.
Parameter #1 $column of method Builder::where() expects Column<'test_string_value'|int>, IntColumn given.
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
This code is query builder using php doc generics.
psalm, mago is correct but phpstan is show reverse message.
I tested Mago and Psalm the results came out correctly, but phpstan's error message is based on the first parameter.
Code snippet that reproduces the problem
https://phpstan.org/r/7b51d8a5-3deb-4aee-a0cb-10955b448f54
Expected output
I expect messge: Parameter #1 $column of method Builder::where() expects Column IntColumn, <'test_string_value'> given.sorry poor expect message
I explained it in detail in the comment below.
But Phpstan print this.
Parameter #1 $column of method Builder::where() expects Column<'test_string_value'|int>, IntColumn given.
Did PHPStan help you today? Did it make you happy in any way?
No response