Closed AlliBalliBaba closed 4 months ago
Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.
Fixes #838
When using
dump()
or@dump
in Octane nothing is displayed when we're in the context of a request. One would expect a dump in form of HTML like it's the case in regular LaravelThis commit fixes the Symfony
VarDumper
so it detects whether we're in console or not by usingapp()->runningInConsole()
instead of looking at the value ofPHP_SAPI
.The test I wrote checks that Blade explicity renders a dumped variable. It is unfortunate that I have to explicitly set
$_ENV['APP_RUNNING_IN_CONSOLE']
in the test and unset it afterwards. It probably would be better to generally mockapp()->runningInConsole()
so it returns false for all tests. In the scope of this fix I did not want to touch other tests though.Cheers