bugsnag / bugsnag-laravel

BugSnag notifier for the Laravel PHP framework. Monitor and report Laravel errors.
https://docs.bugsnag.com/platforms/php/laravel/
MIT License
876 stars 129 forks source link

Bugsnag not working with laravel 5.4 #218

Closed rashidali1989 closed 7 years ago

rashidali1989 commented 7 years ago

Hi I recently update to laravel 5.4 , but bug snag seems to use old function of laravel. I am getting following error.

PHP Fatal error:  Call to undefined method Illuminate\Events\Dispatcher::firing() in /home/vagrant/Code/googleadwords/vendor/bugsnag/bugsnag-laravel/src/BugsnagServiceProvider.php on line 70
PHP Stack trace:
PHP   1. {main}() /home/vagrant/Code/googleadwords/artisan:0
PHP   2. Illuminate\Foundation\Console\Kernel->handle() /home/vagrant/Code/googleadwords/artisan:36
PHP   3. Illuminate\Foundation\Console\Kernel->bootstrap() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:115
PHP   4. Illuminate\Foundation\Application->bootstrapWith() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:270
PHP   5. Illuminate\Events\Dispatcher->fire() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:210
PHP   6. Illuminate\Events\Dispatcher->dispatch() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:172
PHP   7. Illuminate\Events\Dispatcher->Illuminate\Events\{closure}() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:199
PHP   8. Bugsnag\BugsnagLaravel\BugsnagServiceProvider->Bugsnag\BugsnagLaravel\{closure}() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:332
PHP Fatal error:  Call to undefined method Illuminate\Events\Dispatcher::firing() in /home/vagrant/Code/googleadwords/vendor/bugsnag/bugsnag-laravel/src/BugsnagServiceProvider.php on line 70
PHP Stack trace:
PHP   1. {main}() /home/vagrant/Code/googleadwords/artisan:0
PHP   2. Illuminate\Foundation\Console\Kernel->handle() /home/vagrant/Code/googleadwords/artisan:36
PHP   3. Illuminate\Foundation\Console\Kernel->bootstrap() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:115
PHP   4. Illuminate\Foundation\Application->bootstrapWith() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:270
PHP   5. Illuminate\Events\Dispatcher->fire() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:210
PHP   6. Illuminate\Events\Dispatcher->dispatch() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:172
PHP   7. Illuminate\Events\Dispatcher->Illuminate\Events\{closure}() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:199
PHP   8. Bugsnag\BugsnagLaravel\BugsnagServiceProvider->Bugsnag\BugsnagLaravel\{closure}() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:332
PHP   9. Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:0
PHP  10. Illuminate\Foundation\Bootstrap\HandleExceptions->handleException() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:119
PHP  11. App\Exceptions\Handler->report() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:80
PHP  12. Illuminate\Foundation\Exceptions\Handler->report() /home/vagrant/Code/googleadwords/app/Exceptions/Handler.php:42
PHP  13. Bugsnag\PsrLogger\AbstractLogger->error() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:71
PHP  14. Bugsnag\PsrLogger\MultiLogger->log() /home/vagrant/Code/googleadwords/vendor/bugsnag/bugsnag-psr-logger/src/AbstractLogger.php:58
PHP  15. Illuminate\Log\Writer->log() /home/vagrant/Code/googleadwords/vendor/bugsnag/bugsnag-psr-logger/src/MultiLogger.php:38
PHP  16. Illuminate\Log\Writer->writeLog() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Log/Writer.php:175
PHP  17. Illuminate\Log\Writer->fireLogEvent() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Log/Writer.php:201
PHP  18. Illuminate\Events\Dispatcher->dispatch() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Log/Writer.php:297
PHP  19. Illuminate\Events\Dispatcher->Illuminate\Events\{closure}() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:199
PHP  20. Bugsnag\BugsnagLaravel\BugsnagServiceProvider->Bugsnag\BugsnagLaravel\{closure}() /home/vagrant/Code/googleadwords/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:332
Script php artisan clear-compiled handling the post-install-cmd event returned with error code 255
rashidali1989 commented 7 years ago

Any help in this regard will greatly appreciated.

kattrali commented 7 years ago

Thanks for the report, @rashid-ali4u. What version of bugsnag-laravel are you using?

GrahamCampbell commented 7 years ago

This problem should have been in the v2.3.0 release I think. Specifically, by: https://github.com/bugsnag/bugsnag-laravel/pull/186

kattrali commented 7 years ago

That was my thought as well, but wanted to make sure.

rashidali1989 commented 7 years ago

I was using 2.2 version , which was working fine with laravel 5.3. when i updated to laravel 5.4 it did not work. I tried updating bugsnag version to 2.4 but it did not work.

"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.4.*",
    "laracasts/flash": "^1.3",
    "lusitanian/oauth": "~0.3",
    "proengsoft/laravel-jsvalidation": "^1.2",
    "camroncade/timezone": "^0.1.0",
    "sendgrid/sendgrid": "^4.0",
    "illuminate/html": "^5.0",
    "barryvdh/laravel-debugbar": "^2.0",
    "nikolajlovenhardt/laravel-google-ads": "dev-master",
    "league/oauth2-google": "^1.0",
    "pda/pheanstalk": "~3.0",
    "goodby/csv": "^1.2",
    "google/apiclient": "^2.1.2",
    "guzzlehttp/guzzle": "~6.0",
    "arcanedev/log-viewer": "^3.9",
    "bugsnag/bugsnag-laravel": "2.4",
    "salsify/json-streaming-parser": "^6.0",
    "flynsarmy/csv-seeder": "1.*",
    "league/flysystem-aws-s3-v3": "^1.0",
    "dusterio/laravel-aws-worker": "^0.1.9"
  },
  "require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~5.7",
    "symfony/css-selector": "3.1.*",
    "symfony/dom-crawler": "3.1.*",
    "doctrine/dbal": "^2.5"
  },
GrahamCampbell commented 7 years ago

"bugsnag/bugsnag-laravel": "2.4",

That version constraint means exactly 2.4.0.0 when composer resolves it. You should probably use ^2.4 or 2.4.*.

rashidali1989 commented 7 years ago

I just updated it to ^2.4 . But still there is error.

rashidali1989 commented 7 years ago

Are you fixing this bug?

GrahamCampbell commented 7 years ago

Are you fixing this bug?

I can't replicate this. Version 2.4.x does not have code like is shown in your stack trace. It is possible your server is caching an old version of the file.

rashidali1989 commented 7 years ago

Thank You , After clearing my cache It is working fine.