jenssegers / laravel-rollbar

Rollbar error monitoring integration for Laravel projects
329 stars 99 forks source link

Rollbar not being instantiated on command-line #15

Closed phroggyy closed 9 years ago

phroggyy commented 9 years ago

When using php artisan migrate and there is an error (I just attempted to migrate with TestDummy without having it installed), we first receive the fatal error PHP Fatal error: Class 'Laracasts\TestDummy\Factory' not found in, then a stack trace, then our symphony FatalErrorException screen shot 2015-05-28 at 17 22 49

And then we get, instead of reporting the error to Rollbar, PHP Fatal error: Call to a member function report_php_error() on null in /directory/to/repository/vendor/rollbar/rollbar/src/rollbar.php on line 61.

So how can we pull in Rollbar even for artisan commands? (since the App is never loaded)

jenssegers commented 9 years ago

This should be fixed now.