Closed Krinkle closed 4 years ago
I've tried to reproduce this issue using v 1.0.0, but failed.
Might help to know what PHP version you are using and possibly what OS.
I can't find the original build failure but based on ops logs, I believe it would have been PHP 7.2.8.
Tried again, now with PHP 7.2.8 and still can't reproduce this (on Windows). Tried with the last release as well as with the latest master
.
My original report was from a @Wikimedia repository. We have since found other cases which are still reproducible, reported at https://phabricator.wikimedia.org/T202581.
Looks like it wasn't from PHP 7.2, but from HHVM 3.18 (we run both side-by-side currently).
In that case, I'll have to leave it for someone else to figure out. I haven't got HHVM installed, so won't be able to test it.
At a quick glance, it sounds like a regex problem due to different formats between PHP and HHVM. Compare https://github.com/JakubOnderka/PHP-Parallel-Lint/blob/89553b3b5f772230dd350806ab4103cee380d2eb/src/Error.php#L114 with https://3v4l.org/4EYDe
3v4l seems to be reporting line -1 as well, but that should be another problem.
Of course, there may be other regexps that work with Zend only, but this one seems to be the only responsible for the wrong syntax error line.
The project continues under a new GitHub organisation at: https://github.com/php-parallel-lint/PHP-Parallel-Lint.
(This move is recognised in the project's readme, see commit).
The following example code:
This contains a syntax error in the
getDataScript
signature.Using jakub-onderka/php-parallel-lint (v1.0.0), the error is:
I'm glad it found the mistake and it wasn't hard to find, but it would've been even nicer if it also mentioned the line number.