laracasts / PHP-Vars-To-Js-Transformer

Transform PHP data to JavaScript.
https://packagist.org/packages/laracasts/utilities
MIT License
2.21k stars 219 forks source link

Occasionally sets previous variables using Laravel Octane #140

Open jeremy-smith-maco opened 2 years ago

jeremy-smith-maco commented 2 years ago

We are using Laravel Octane and it will sometimes put the previous request's variables into the current request. Putting a breakpoint in the LaravelViewBinder class, it will get hit multiple times with the same variables or with other variables from the previous request which are no longer valid for the current request.

I am not sure what is causing it but I am guessing something is cached in the Octane instance which is not refreshing. I am not sure how to get around it either, other than manually doing the JS parsing myself.