Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Dotenv] Reimplementing symfony/flex' dump-env as a Symfony command#42610
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
t-richard left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Its also missing tests. Seehttps://github.com/symfony/flex/blob/main/tests/Command/DumpEnvCommandTest.php
Otherwise I'm 👍, it also proved to be sub-optimal for me to have it as a composer plugin command rather than a symfony command.
It would be great if you were also able to submit a PR tohttps://github.com/symfony/flex for the deprecation of the the command.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
abdielcs commentedAug 18, 2021
Help with this issues please? |
ro0NL commentedAug 19, 2021
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedSep 8, 2021
Please rebase and squash also (PR should not contain any merge commits) |
nicolas-grekas commentedSep 24, 2021
We might need to implementsymfony/flex#810 in this also. |
abdielcs commentedSep 24, 2021
@nicolas-grekas Al the work is done, but I can't managed to pass the rebase. Really would appreciate help here. Sorry for been so newbie doing PR. |
nicolas-grekas commentedSep 27, 2021
@abdielcs I rebased the PR and pushed it on your fork. Please fetch and sync your local copy before moving the command to the component. |
ea949b4 toe15b003Compare
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I rebased the PR and added a second commit to completly decouple the command from FrameworkBundle.
@abdielcs I saw that you somehow messed up with the git history in previous iterations. As a general rule of thumb, do never ever usegit merge when working on PRs for open-source projects. Usegit rebase instead.
nicolas-grekas commentedSep 30, 2021
Thank you@abdielcs. |
mbrodala commentedSep 30, 2021
Awesome thanks a lot! |
…dition (see#6954)Description-----------We know that Contao is mostly deployed on hosting providers that do not support real environment variables but we also rely on the `Dotenv` component ourselves for e.g. Mailer configuration etc.For performance reasons, on those systems I would like to run `dotenv:dump` so Symfony dumps `.env.local.php` which is way faster as it can be cached in OPCode cache. Of course, you cannot change `.env.local` anymore without also updating that file then. But you will have to add `dotenv:dump` to your deploy chain manually anyway so you'll know that - it doesn't happen just like that.However, the command is not registered by default in Symfony even though it has been around since Symfony 5.4. Seesymfony/symfony#42610. This means that right now I have to add this configuration to every ME but given the fact of our hosting provider situation, I think this qualifies to be a good default.Again, it just makes sure the command is around, you'll still have to use it yourself.Commits-------5f18133 Register the dotenv:dump command by default in the Contao ME11337ab Adjust service namef236946 Update manager-bundle/config/services.yaml
…dition (see #6954)Description-----------We know that Contao is mostly deployed on hosting providers that do not support real environment variables but we also rely on the `Dotenv` component ourselves for e.g. Mailer configuration etc.For performance reasons, on those systems I would like to run `dotenv:dump` so Symfony dumps `.env.local.php` which is way faster as it can be cached in OPCode cache. Of course, you cannot change `.env.local` anymore without also updating that file then. But you will have to add `dotenv:dump` to your deploy chain manually anyway so you'll know that - it doesn't happen just like that.However, the command is not registered by default in Symfony even though it has been around since Symfony 5.4. Seesymfony/symfony#42610. This means that right now I have to add this configuration to every ME but given the fact of our hosting provider situation, I think this qualifies to be a good default.Again, it just makes sure the command is around, you'll still have to use it yourself.Commits-------5f181332 Register the dotenv:dump command by default in the Contao ME11337abd Adjust service namef236946e Update manager-bundle/config/services.yaml
Uh oh!
There was an error while loading.Please reload this page.
[FrameworkBundle] Reimplementing the symfony/flex env-dump as a symfony command. Most of code copied fromhttps://github.com/symfony/flex/blob/main/src/Command/DumpEnvCommand.php
The command is not registered by default. In order to enable it, one must add it to their
services.yamlfile:On PHP >= 8, the two arguments can be removed when autoconfiguration is enabled (which is the default):