Undefined constant PHPStan\PhpDocParser\Ast\Type\GenericTypeNode::VARIANCE_INVARIANT
kro94f opened this issue · 2 comments
Hi,
We have a project that uses rector on each commit in order to verify that the code has no issues. Also, we used rector when we upgraded the app from PHP 7.4 to PHP 8.0.
Since the upgrade, we can't use Rector anymore. We get this error from phpstan/phpdoc-parser
Undefined constant PHPStan\PhpDocParser\Ast\Type\GenericTypeNode::VARIANCE_INVARIANT".
We use the latest version of your package (1.16.1).
It seems that the issue is on this line of code: https://github.com/phpstan/phpdoc-parser/blob/1.16.1/src/Parser/TypeParser.php#L370
At a first glance, the code is fine. Do you know anything about this issue?
Thanks.
I guess that wrong version of phpstan/phpdoc-parser is autoloaded. Make sure to use the latest version of Rector too, it should also contain phpdoc-parser 1.16.1.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.