Skip to content

[DotEnv]: Environment variables in .env are evaluated as empty strings #34598

@Abdull

Description

@Abdull

Symfony DotEnv version(s) affected: v4.3.6 up until at least v4.3.8

Description
Using environment variables in .env files fails.

How to reproduce

  • Create .env file with the following content:
MY_HOSTNAME=${HOSTNAME}

where HOSTNAME is an existing environment variable.

  • Expected result: MY_HOSTNAME will have the value of the HOSTNAME environment variable.
  • Actual result : MY_HOSTNAME has no value.

Additional context
I ran into this problem in the context of TYPO3 9LTS with dependency dotenv-connector:v2.1.2 which has a dependency on symfony/dotenv:^4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    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