Skip to content

Update configuration.rst to avoid misunderstanding #16394

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
Jan 19, 2022
Merged

Update configuration.rst to avoid misunderstanding #16394

merged 1 commit into from
Jan 19, 2022

Conversation

mertingen
Copy link
Contributor

We shouldn't deploy the ".env.local" file for the production environment variables. We just need to add the ".env" file into Git and manually create a new ".env.local" file on the production machine. In the old expression says, "deploying" and it might be a misunderstanding in this way. I changed it to "creating".

Old expression:
In production, the .env files are also parsed and loaded on each request. So
the easiest way to define env vars is by deploying a .env.local file to your
production server(s) with your production values.

Copy link
Contributor

@94noni 94noni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps target v5.4?
Even more, you can also reword the next paragraph and instead of using composer dump-env, use the new same symfony feature symfony/symfony#42610 :)

@mertingen mertingen changed the title Update configuration.rst to aviod misunderstanding Update configuration.rst to avoid misunderstanding Jan 15, 2022
@mertingen
Copy link
Contributor Author

@94noni Thanks for referring to it. Should I change the base branch from 6.0 to 5.4? In addition to that, how does that command work? Should I change the following?

From
composer dump-env prod

To
symfony console dotenv:dump prod

Or
bin/console dotenv:dump prod

We shouldn't deploy the ".env.local" file for the production environment variables. We just need to add the ".env" file into Git and manually create a new ".env.local" file on the production machine. In the old expression says, "deploying" and it might be a misunderstanding in this way. I changed it to "creating".

Old expression:
In production, the ``.env`` files are also parsed and loaded on each request. So
the easiest way to define env vars is by deploying a ``.env.local`` file to your
production server(s) with your production values.
@wouterj wouterj changed the base branch from 6.0 to 4.4 January 19, 2022 14:51
@wouterj wouterj merged commit 885d082 into symfony:4.4 Jan 19, 2022
@wouterj
Copy link
Member

wouterj commented Jan 19, 2022

Thanks @mertingen! I've merged this in 4.4, the oldest branch that we still maintain (and this change applies to).

We're not sure how to document the new dump-env command: #15878

And to answer your question: symfony console and bin/console are effectively the same command (except that symfony console runs the command within the Symfony CLI env, e.g. you have access to all automatically generated env vars).

@mertingen mertingen deleted the patch-1 branch January 19, 2022 15:34
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.

4 participants