Bug report
PHPStan ^0.11
Code snippet that reproduces the problem
<?php declare(strict_types = 1);
class HelloWorld
{
public function sayHello(): void
{
$className = '\Foo\Bar';
if (class_exists($className)) {
var_dump(new $className());
}
}
}
https://phpstan.org/r/b895a259-7bee-488b-a8a2-a33498934f90
Class Foo\Bar not found and could not be autoloaded.
Expected output
No error.
Is this a bug or just not supported? I'm finally upgrading from 0.9 to 0.11. This used to not throw an error.