Closed
Description
Symfony: 5.1.x
Description
After upgrading to 5.1.x this error is shown every time, after Cache-Clear Symfony complains:
Environment variables "APP_SECRET" are never used. Please, check your container's configuration.
I have the APP_SECRET
var in my .env
or .env.local.php
set.
Also in framework.yaml
framework:
secret: '%env(APP_SECRET)%'
How to reproduce
composer update
wait until cache:clear starts.
Possible Solution
Temporarily removing 'secret' => '%env(APP_SECRET)%',
from MicroKernelTrait
helps.
{
$loader->load(function (ContainerBuilder $container) use ($loader) {
$container->loadFromExtension('framework', [
// 'secret' => '%env(APP_SECRET)%',
'router' => [
'resource' => 'kernel::loadRoutes',
'type' => 'service',
],
]);