Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpstan crashes with LogicException #3422

Closed
ADmad opened this issue Jun 9, 2020 · 6 comments
Closed

phpstan crashes with LogicException #3422

ADmad opened this issue Jun 9, 2020 · 6 comments

Comments

@ADmad
Copy link
Contributor

ADmad commented Jun 9, 2020

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

@mergeable
Copy link

mergeable bot commented Jun 9, 2020

This bug report is missing a link to reproduction on phpstan.org.
It will most likely be closed after manual review.

@ondrejmirtes
Copy link
Member

This one should be fixed: phpstan/phpstan-src@ce3d231

Can you verify it by trying out dev-master? Thanks. In case it doesn't work, I'll reopen.

@crevillo
Copy link

Hello. I was having the same error. I can confirm that trying dev-master the error looks fixed. Thanks!.

@ADmad
Copy link
Contributor Author

ADmad commented Jun 13, 2020

@ondrejmirtes Yes, it's fixed on master.

@ondrejmirtes
Copy link
Member

Thank you both!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants