You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to be related to #4288, but not exactly.
Stack trace:
PHP Fatal error: Uncaught LogicException: Failed to find parent class of constant "class". in phar:///source/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionParameter.php:192
Stack trace:
#0 phar:///source/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionParameter.php(146): PHPStan\BetterReflection\Reflection\ReflectionParameter->findParentClassDeclaringConstant('class')
#1 phar:///source/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionParameter.php(257): PHPStan\BetterReflection\Reflection\ReflectionParameter->parseDefaultValueNode()
#2 phar:///source/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionParameter.php(274): PHPStan\BetterReflection\Reflection\ReflectionParameter->getDefaultValue()
#3 phar:///source/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionParameter.php(322): in phar:///source/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionParameter.php on line 192
Bug report
PHPStan crashes when trying to parse code with arguments having default value set to
self::class
.This seems to be related to #4288, but not exactly.
Stack trace:
Code snippet that reproduces the problem
https://phpstan.org/r/1c85152d-6693-4420-9811-9301934276ac
Expected output
No errors.
The text was updated successfully, but these errors were encountered: