Skip to content

strange behavior with ImmutableWriter::isExternallyDefined() #577

Description

@Cyrille37

Hi

  • In a terminal on linux with php 8.3
  • the default Php ini has variables_order = "GPCS" ('E' is not present) so the shell env is not present/copied in php $_ENV.
  • use of $dotenv = Dotenv::createImmutable('.'); $res = $dotenv->load();

If I export a shell env variable "TOTO" then the "TOTO" entry in the .env file is not read because ImmutableWriter::isExternallyDefined() determine that the variable is externally defined.

Finaly I cannot access "TOTO" value which is set in shell env and in .env file.

Isn't this behaviour strange?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions