Skip to content

Misconfigured environment is hard to debug #40071

@BackEndTea

Description

@BackEndTea

Symfony version(s) affected: 5.2

Description
When the environment (either when passing it with --env in CLI, or the APP_ENV env variable), is an empty string, a hard to debug error comes up:

In BaseNode.php line 340:
                                                                                                                  
  Configuration path "security.access_control" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one configuration section.             

How to reproduce

On a fresh symfony project run:

bin/console --env=''

When a non existing environment is provided, everything works 'normally'. The error only occurs if the environment is empty. e.g.

bin/console --env='foo'

Possible Solution

Detect an empty environment as a bug, and report it to the user.

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