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
ASTNode expected, ASTAnonymousClass given #250
Comments
+1 Same issue here. Exact same versions. |
+1 the same |
1 similar comment
+1 the same |
Maybe it can help. This error occurred when anonymous class is used:
|
Is this what you mean @llato ?
All setters in my case return |
I changed the parent class of PHPParserGeneric from PHPParserVersion70 to PHPParserVersion56 in the pdepend source (./pdepend/pdepend/src/main/php/PDepend/Source/Language/PHP/PHPParserGeneric.php line 61). Since I am running php56, i figures this was a weird contruction and it appears to work (for me at least) |
Is there already an solution in site/in Master? |
same here |
that helped thanks 👍 |
dmaij´s solution worked for me aswell, thanks |
So one month later, are we still better off editing vendor code to work around this? :) |
Neither downgrading to 2.2.2 (Cannot create nodes when, interval is in frozen state error) or setting the parser to PHP 5.6 is working for me. I run PHP 7.0.8. |
+1. Same as @fjarlaegur |
Seems like @manuelpichler is working on a fix on a closely same named branch. Last commit 14 days ago. Maybe he can give us some insight in fixing things? EDIT: I fixed my errors. I was running Pdepend on all folders in my project. I was using this for a laravel project, as i changed all modules to just scan the /app folder, my build finally turned green. |
Thanks @fjarlaegur. I was having the same problem until I read your comment and realised I had forgotten to use |
pdepend/pdepend#250 in newer versions prevents us from using anonymous classes
Hi there,
I just ran phpmd on my project with this command:
Error below:
Versions used:
There's anything I could do to find out how to solve this?
The text was updated successfully, but these errors were encountered: