10000 using env var fails in framework.translator.paths (cache) · Issue #24270 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
using env var fails in framework.translator.paths (cache) #24270
Closed
@mathroc

Description

@mathroc
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.3.9

when using an env var inside the value of a framework.translator.paths, the env var value is not resolved, and instead its placeholder is given to the translator

parameters:
  active_site: '%env(ACTIVE_SITE)%'

framework:
    translator:
        paths:
            - "%kernel.root_dir%/../src/ST/AppBundle/Resources/translations_sites/%active_site%"

UnexpectedValueException
/var/www/app/../src/ST/AppBundle/Resources/translations_sites/env_ACTIVE_SITE_1210a6ec49918eebfffc01fc4f72ca65 defined in translator.paths does not exist or is not a directory

note: same thing happen if I use the env directly like that:

framework:
    translator:
        paths:
            - "%kernel.root_dir%/../src/ST/AppBundle/Resources/translations_sites/%env(ACTIVE_SITE)%"

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