laravel / octane

Supercharge your Laravel application's performance.
https://laravel.com/docs/octane
MIT License
3.73k stars 288 forks source link

[2.x] Fix #838: The Symfony VarDumper properly dumps in html context #856

Closed AlliBalliBaba closed 4 months ago

AlliBalliBaba commented 4 months ago

Fixes #838 When using dump(...) for debugging purposes in a request/response context, nothing is displayed in the HTML response. One would expect to see the dumped variable as HTML in the response as is the case with regular Laravel

This one-line fix sets a global parameter that tells the Symfony VarDumper to always dump as html when we are in the context of a request/response with octane. Without this line the VarDumperwill check PHP_SAPI to determine the context of the variable dump (which is always 'cli' with Octane).

Cheers

taylorotwell commented 4 months ago

No plans to change this at this time.