Syntax error
spriebsch opened this issue · comments
Running ./dephpend.phar metrics gives me a syntax error:
[PhpParser\Error]
Syntax error, unexpected T_ELLIPSIS, expecting T_STRING or T_VARIABLE or '{' or '$' on line 145
(dePHPend Phar Sept 15th, 12:30). Other commands seem to have the same problem.
Of course, I added a source directory name to the metrics command. This got cut off by GitHub when posting.
The problem is not with the dephpend.phar
(*). The problem is that I'm not handling Errors when PhpParser encounters malformed source code. I opened an issue for that. I should probably explain why the app crashed (not sure if it would make sense to keep parsing broken code).
(*) tested the latest dephpend.phar
on:
- a Windows 10 VM runnign PHP 7.0.9
- a Fedora 23 installation running PHP 7.0.3
- the latest official docker PHP image using
docker run --privileged=true --rm -it -v /tmp:/opt php:7.0 php /opt/dephpend.phar metrics .
Ah, thanks. That was non-obvious to me (I had just pointed the tool to random code I had lying around).