Skip to content

Environment variables "APP_SECRET" are never used. #37123

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy