Closed assertchris closed 5 years ago
I'm going to put this PR on hold for a bit while we figure out what exactly is the cause of this infinite loop since only PHP 7.3 seems to be affected.
For anyone else reading this, PHP 7.2 and below does not seem to be affected by this bug. If you're running 7.3+ and are affected by this bug, you may have Composer use assertchris' repo instead of the official packagist repo in the meantime, while the bug is investigated.
This PR adds overrun protection to
JsonRef
; to exit from the infinite loop introduced in thejavascript
syntax definition (observed in https://github.com/scrivo/highlight.php/issues/33). This does not address the cause of that issue.I had to update PHPUnit and modernise a tiny bit of code to be able to run this in PHP 7.3.
The
dsconfig
change addresses a change in PCRE that renders[\\w-?]
invalid. The change replaces this with[-?\\w]
.