-
Notifications
You must be signed in to change notification settings - Fork 3
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
Parser error #4
Comments
Thanks @rockoo for the bug report. This seems to be the problem I found in #1. It basically means the file you are checking is not a valid php file. For #1 I will improve how these exceptions are handled. Do you mind if I ask you to try the same run again after I have fixed it, to see if that also fixes this issue? |
I had the same issue when running this on my entire project. I'm using a custom framework that includes php files, js files, html files, etc. By specifying the directory/file I want to scan I avoid this error. Example: $vendor/bin/php-doc-check -d /Users/myuser/Documents/projects/myproject/private/Models This scans my entire Models directory which contains only PHP files, hence no invalid php file errors |
Hi @rockoo, @petardfoozer The fix of #1 is now merged and should also resolve this issue. Could you retry the command that failed before, to see if it no longer crashes on unparsable files? |
I am considering this fixed. |
@NielsdeBlaauw thank you for fast response and sorry for my late reply. For some reason I didnt get an email nor it showed me notification. It is fixed! Thank you |
There is some failure half through analysis and it throws the following exception:
.PHP Fatal error: Uncaught PhpParser\Error: Unexpected null byte on line 1 in ...vendor/nikic/php-parser/lib/PhpParser/Lexer.php:100
The text was updated successfully, but these errors were encountered: