What session driver are you using? Where and how is the app being deployed (AWS, Forge, ...)?
May 21, 2021
6
Level 6
Target class [session] does not exist
On deployment we also empty all caches, run php artisan optimize, reload PHP FPM with sudo /etc/init.d/php7.4-fpm restart. Still we got these errors recently.
[2021-05-21 10:47:25] staging.ERROR: Target class [session] does not exist. {"exception":"[object] (Illuminate\Contracts\Container\BindingResolutionException(code: 0): Target class [session] does not exist. at /home/forge/staging.site.com/releases/551/vendor/laravel/framework/src/Illuminate/Container/Container.php:835)
[stacktrace]
#0 /home/forge/staging.site.com/releases/551/vendor/laravel/framework/src/Illuminate/Container/Container.php(714): Illuminate\Container\Container->build('session')
#1 /home/forge/staging.site.com/releases/551/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(841): Illuminate\Container\Container->resolve('session', Array, true)
any idea what the cause can be?
Level 6
Using
....
shared_dirs:
- 'bootstrap/cache'
..
now to avoid the issue and keep cache in shared directory. Should solve the issue.
Please or to participate in this conversation.