laravel-referer 1.7.2 on Laravel 7.30.4 — composer error on upgrade
jordanade opened this issue · comments
- Upgrading spatie/laravel-referer (1.7.1 => 1.7.2): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Error
Call to undefined method Illuminate\Container\ContextualBindingBuilder::giveConfig()
at vendor/spatie/laravel-referer/src/RefererServiceProvider.php:28
24| $this->mergeConfigFrom(__DIR__.'/../config/referer.php', 'referer');
25|
26| $this->app->when(Referer::class)
27| ->needs('$sessionKey')
> 28| ->giveConfig('referer.session_key');
29|
30| $this->app->when(Referer::class)
31| ->needs('$sources')
32| ->giveConfig('referer.sources');
+7 vendor frames
8 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
Same issue here! :/
Did you find a workaround?
when use "spatie/laravel-referer": "1.3.4"
it's fixed
the issues is in giveConfig()
at RefererServiceProvider.php
in Laravel < 8.* there is no giveConfig method