Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strange behavior with ImmutableWriter::isExternallyDefined() #577

Open
Cyrille37 opened this issue Dec 19, 2024 · 0 comments
Open

strange behavior with ImmutableWriter::isExternallyDefined() #577

Cyrille37 opened this issue Dec 19, 2024 · 0 comments

Comments

@Cyrille37
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant