-
-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Description
Bug report
The following code does not cause any errors (https://phpstan.org/r/a18abfec-c963-4f5b-afcf-416f557f34f3):
namespace abc;
use foo\bar;
require_once '';
/** @var bar $x */
$x = new bar();However, adding require_once between namespace and use statement causes the error PHPDoc tag @var for variable $x contains unknown class abc\bar. (https://phpstan.org/r/5dd10c66-6a6b-48c4-9cc7-43808b0071af):
namespace abc;
require_once '';
use foo\bar;
/** @var bar $x */
$x = new bar();Worked until v1.2
Broken in v1.3.3
The bug looks similar to #6252
Code snippet that reproduces the problem
https://phpstan.org/r/5dd10c66-6a6b-48c4-9cc7-43808b0071af
Did PHPStan help you today? Did it make you happy in any way?
Thank you for developing this great tool!
Metadata
Metadata
Assignees
Labels
No labels