8000 Environment variables "APP_SECRET" are never used. · Issue #37123 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Environment variables "APP_SECRET" are never used. #37123
Closed
@ralusnom

Description

@ralusnom

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)%'

image

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',
                ],
            ]);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0