Skip to content

[Dotenv] Fix SYMFONY_DOTENV_PATH purpose #19923

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

Merged
merged 1 commit into from
May 30, 2024

Conversation

alexandre-daubois
Copy link
Member

After #19371 (comment), sorry for the misunderstanding on this feature!

I guess https://symfony.com/blog/new-in-symfony-7-1-misc-improvements-part-2#custom-env-path will also need an update.

cc @nicolas-grekas

@OskarStark
Copy link
Contributor

Thank you Alexandre.

@OskarStark OskarStark merged commit d5901c3 into symfony:7.1 May 30, 2024
3 checks passed
@javiereguiluz
Copy link
Member

Now I understand this feature even less 😐

Nicolas' comment at #19371 (comment)

This var is not about changing the location of the dot env files. It's about exposing where the dotenv files are so that the apps itself can know about it.

But, how do you change the location of the .env files?

@alexandre-daubois
Copy link
Member Author

alexandre-daubois commented May 30, 2024

You can change the location of .env files with the two solutions proposed in the "Storing Environment Variables In Other Files" section. And if you need to get, in your app, the .env files paths used by Symfony at runtime, then you can read the SYMFONY_DOTENV_PATH env var. Is it clearer to you?

@javiereguiluz
Copy link
Member

Thanks Alex! It's clear now 👍 I've updated the blog post too.

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

Successfully merging this pull request may close these issues.

6 participants