Skip to content

phpstan crashes with LogicException #3422

@ADmad

Description

@ADmad

Bug report

phpstan analyse src/ORM/Query.php --debug 
Note: Using configuration file /srv/sites/cake-apps/cakephp/phpstan.neon.
/path/to/cakephp/src/ORM/Query.php
PHP Fatal error:  Uncaught LogicException: Failed to find parent class of constant "APPEND". in phar:///path/to/.phive/phars/phpstan-0.12.27.phar/vendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionParameter.php:176
Stack trace:
#0 phar:///path/to/.phive/phars/phpstan-0.12.27.phar/vendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionParameter.php(143): _HumbugBox2376040b7d58\Roave\BetterReflection\Reflection\ReflectionParameter->findParentClassDeclaringConstant('APPEND')
#1 phar:///path/to/.phive/phars/phpstan-0.12.27.phar/vendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionParameter.php(241): _HumbugBox2376040b7d58\Roave\BetterReflection\Reflection\ReflectionParameter->parseDefaultValueNode()
#2 phar:///path/to/.phive/phars/phpstan-0.12.27.phar/vendor/ondrejmirtes/better-reflection/src/Reflection/Adapter/ReflectionParameter.php(144): _HumbugBox2376040b7d58\Roave\BetterReflection\Reflection\ReflectionParameter->getDefaultValue()
#3 phar:///path/to/.phive/phars/phpstan-0.12.27.phar in phar:///path/to/.phive/phars/phpstan-0.12.27.phar/vendor/ondrejmirtes/better-reflection/src/Reflection/ReflectionParameter.php on line 176

Code snippet that reproduces the problem

https://github.com/cakephp/cakephp/blob/master/src/ORM/Query.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions