laravel / vonage-notification-channel

Vonage Notification Channel for Laravel.
https://laravel.com/docs/notifications#sms-notifications
MIT License
744 stars 51 forks source link

Unresolvable dependency #2

Closed adrenth closed 5 years ago

adrenth commented 5 years ago

Got a Unresolvable dependency resolving [Parameter #0 [ <required> $app ]] in class Illuminate\Support\Manager after upgrading to latest laravel 5.7.16.

Stack trace

Unresolvable dependency resolving [Parameter #0 [ <required> $app ]] in class Illuminate\Support\Manager {"exception":"[object] (Illuminate\\Contracts\\Container\\BindingResolutionException(code: 0): Unresolvable dependency resolving [Parameter #0 [ <required> $app ]] in class Illuminate\\Support\\Manager at /myproject/vendor/laravel/framework/src/Illuminate/Container/Container.php:960)
[stacktrace]
#0 /myproject/vendor/laravel/framework/src/Illuminate/Container/Container.php(898): Illuminate\\Container\\Container->unresolvablePrimitive(Object(ReflectionParameter))
#1 /myproject/vendor/laravel/framework/src/Illuminate/Container/Container.php(839): Illuminate\\Container\\Container->resolvePrimitive(Object(ReflectionParameter))
#2 /myproject/vendor/laravel/framework/src/Illuminate/Container/Container.php(807): Illuminate\\Container\\Container->resolveDependencies(Array)
#3 /myproject/vendor/laravel/framework/src/Illuminate/Container/Container.php(658): Illuminate\\Container\\Container->build('Illuminate\\\\Noti...')
#4 /myproject/vendor/laravel/framework/src/Illuminate/Container/Container.php(609): Illuminate\\Container\\Container->resolve('Illuminate\\\\Noti...', Array)
#5 /myproject/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(735): Illuminate\\Container\\Container->make('Illuminate\\\\Noti...', Array)
#6 /myproject/vendor/laravel/framework/src/Illuminate/Container/Container.php(1222): Illuminate\\Foundation\\Application->make('Illuminate\\\\Noti...')
#7 /myproject/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(161): Illuminate\\Container\\Container->offsetGet('Illuminate\\\\Noti...')
#8 /myproject/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(130): Illuminate\\Support\\Facades\\Facade::resolveFacadeInstance('Illuminate\\\\Noti...')
#9 /myproject/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(217): Illuminate\\Support\\Facades\\Facade::getFacadeRoot()
#10 /myproject/vendor/laravel/nexmo-notification-channel/src/NexmoChannelServiceProvider.php(27): Illuminate\\Support\\Facades\\Facade::__callStatic('extend', Array)
#11 /myproject/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(574): Illuminate\\Notifications\\NexmoChannelServiceProvider->register()
#12 /myproject/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\\Foundation\\Application->register(Object(Illuminate\\Notifications\\NexmoChannelServiceProvider))
#13 /myproject/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(550): Illuminate\\Foundation\\ProviderRepository->load(Array)
#14 /myproject/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(17): Illuminate\\Foundation\\Application->registerConfiguredProviders()
#15 /myproject/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(204): Illuminate\\Foundation\\Bootstrap\\RegisterProviders->bootstrap(Object(Illuminate\\Foundation\\Application))
#16 /myproject/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(297): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#17 /myproject/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(120): Illuminate\\Foundation\\Console\\Kernel->bootstrap()
#18 /myproject/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#19 {main}
driesvints commented 5 years ago

Did you try the solution from https://github.com/laravel/framework/issues/26766?

adrenth commented 5 years ago

Thanks for the reference to the solution!

Adding Illuminate\Notifications\NotificationServiceProvider::class to my config/app.php fixed it for me.