-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
PHPMD fails to parse php files where trailing comma is used in multiline function or method arguments. #889
Comments
same here: phpmd 2.10.1
Reproduction: |
@JBx0 thanks for your comment, as you can see this issue is still open. If you have the possibility you can create a PR with a fix, else we need to wait till someone else has the time to fix this. 😃 |
@tvbeek xD yes I can see, but those are new versions I referenced ;) |
@JBx0 as long as the issue is open it will not be changed in new versions :) |
@tvbeek I'd need some assistance for that since I have no clue of the codebase! |
@JBx0 This bug is more likely upstream rather than in PHPMD. See this stacktrace:
It might already be fixed by pdepend/pdepend#534. It was merged to master on May 13th, but it hasn't been tagged in a release yet. Short of depending on For now though, |
Works for trailing comma! Thx |
You can update to last pdepend/pdepend now to get it fixed, phar version of 2.10.2 that will have it will be released this week too. |
Current Behavior
When using trailing comma in multi-line function / method arguments, phpmd fails with following message:
Example function:
Expected Behavior
It should not fail as this is supported since php 7.4.
Steps To Reproduce:
Explain all the steps you did to create this bug so we can reproduce it.
Checks before submitting
The text was updated successfully, but these errors were encountered: