3

Laravel 5.5 app. Originally 5.3. I installed the filp/whoops package as per the upgrade guide, but now I want to disable it, as I believe it is causing "out of memory" errors on my Homestead machine whenever I encounter an error, which is really annoying because all I see is "allowed memory size of XXXXXX bytes exhausted" instead of the real error, which is usually a parse error of some sort. I do NOT want to change the memory available to PHP as it matches what I have on my production server.

Is there any simple way to disable this package without removing it?

Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291
fronzee
  • 1,668
  • 2
  • 21
  • 32

1 Answers1

4

Try to add into app/Exceptions/Handler.php the following method:

protected function renderExceptionWithWhoops(Exception $e)
{
    return $this->renderExceptionWithSymfony($e, config('app.debug'));
}

This will override default implementation and should cause rendering exception without Whoops package.

Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291
  • Thanks! Sadly this did not solve my out of memory issue, but it appears to have worked for disabling Whoops. – fronzee Dec 21 '17 at 18:46
  • 4
    Shooting the messenger is never a good idea. Increase you memory limit on your local machine and let woops do its job - telling you what kind of error you have and fix this. – common sense Dec 21 '17 at 19:12