Bug report
See snippet, AST node itself has the fixed case. I believe this is done by PhpParser\NodeVisitor\NameResolver and you should check originalName attribute to see the real case used:

When no use statement is used, it works: https://phpstan.org/r/0e21633f-6c52-442d-9e83-a1a3516f9d16
Code snippet that reproduces the problem
https://phpstan.org/r/334fc9ec-9605-48e7-9d6d-43337f419d5f
Expected output
Class Foo\Post referenced with incorrect case: Foo\POST.
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
See snippet, AST node itself has the fixed case. I believe this is done by
PhpParser\NodeVisitor\NameResolverand you should checkoriginalNameattribute to see the real case used:When no use statement is used, it works: https://phpstan.org/r/0e21633f-6c52-442d-9e83-a1a3516f9d16
Code snippet that reproduces the problem
https://phpstan.org/r/334fc9ec-9605-48e7-9d6d-43337f419d5f
Expected output
Class Foo\Post referenced with incorrect case: Foo\POST.Did PHPStan help you today? Did it make you happy in any way?
No response