Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Environment variables "APP_SECRET" are never used. #37123

Copy link
Copy link
Closed
@ralusnom

Description

@ralusnom
Issue body actions

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.