Closed assertchris closed 5 years ago
I tested running the highlighter on PHP 7.2.10 and it runs just fine. However, it goes into an infinite loop starting with PHP 7.3.0 so something changed between 7.2 and 7.3 that is causing this infinite loop.
The behavior of how references are returned has changed in 7.3.0 and I believe this change in behavior is causing JsonRef::resolvePathReferences()
to incorrectly nest into references it's already visited.
I have come across the same issue.
Thanks for the report and fix, @assertchris! Really appreciate it 👍
v9.13.1.1 has been released with your changes from #34 included. I've also added PHP 7.3 and nightly to Travis so that will hopefully help us find these problems sooner.
Thanks for sorting this out so quickly, and sorry for not getting back to you sooner about it!
Library version: ^9.13 PHP version: 7.3.1
I'm trying to highlight
javascript
code, and the highlighter gets stuck in an infinite loop while trying toresolvePathReferences
. Here's a GIF of the diagnosis:The code it is compiling for is:
...but I don't think the code is the problem here. I suspect a recent-ish change to the javascript syntax has caused this infinite loop behaviour.
Edit: after further investigation, I don't think think a syntax definition change is responsible, since the definition file hasn't changed recently in a way that would cause new behaviour. Still unsure of the cause.