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

[DI] Prevent an infinite loop when using env vars in service names #25123

Copy link
Copy link
Closed
@raziel057

Description

@raziel057
Issue body actions
Q A
Bug report? no
Feature request? no
BC Break report? yes
RFC? no
Symfony version 3.3.11

Related to this thread: #24673

With this commit it's not possible anymore to use an environment parameter as name of in_memory providers. It's not really a big problem but it's a BC break when upgrading from 3.3.10 to 3.3.11. Is it wanted?

Example:

parameters:
    admin_username: '%env(ADMIN_USERNAME)%'
    admin_password: '%env(ADMIN_PASSWORD)%'

providers:
    in_memory:
        memory:
            users:
                - { name: "%admin_username%", password: "%admin_password%", roles: 'ADMIN' }

Lead to this exception:

[Symfony\Component\DependencyInjection\Exception\EnvParameterException]        
    A service name ("security.user.provider.concrete.in_memory_%env(ADMIN_USER    
    NAME)%") cannot contain dynamic values.  

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.