berkayk / laravel-onesignal

OneSignal Push Notifications for Laravel
506 stars 176 forks source link

Call to undefined method Illuminate\Foundation\Application::configure() #98

Closed MatheusNaldi closed 5 years ago

MatheusNaldi commented 5 years ago

Hi, I have just updated my project and some packages to laravel 5.5, and when I run composer dump -o this error is occurring in autodiscover feature from 5.5, I saw this line on your package's service provider:

if ( class_exists('Laravel\Lumen\Application') ) {
    $this->app->configure('onesignal');
}

I have one package that is requiring both laravel/framework and laravel/lumen-framework, but lumen is not being used, so, I think it's needed to change this validation to not just verify if the class exists, but the method too or if the $this->app instanceof Lumen, I will do a PR right now.