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

Add "dump-env" command to compile .env files to .env.local.php #449

Merged
merged 2 commits into from Jan 21, 2019

Conversation

Projects
None yet
4 participants
@nicolas-grekas
Copy link
Member

nicolas-grekas commented Dec 12, 2018

This adds a new command that compiles .env files to .env.local.php:

$ composer dump-env prod
Successfully dumped .env files in .env.local.php

The generated file is used in symfony/recipes#501

Show resolved Hide resolved src/Command/DumpEnvCommand.php Outdated

@nicolas-grekas nicolas-grekas force-pushed the nicolas-grekas:dump-env branch from 19b699b to 31b12b1 Dec 19, 2018

@lyrixx

This comment has been minimized.

Copy link
Member

lyrixx commented Jan 2, 2019

Why is this a composer command? IMHO it should be a Symfony command (bin/console env:dump prod)

@nicolas-grekas

This comment has been minimized.

Copy link
Member Author

nicolas-grekas commented Jan 2, 2019

At least because we want to ship this for all Symfony versions without waiting for 4.3.

@lyrixx

This comment has been minimized.

Copy link
Member

lyrixx commented Jan 2, 2019

This seems a hack to me. If we go in that sens, we will move many code here.
I understand the reason, but I don't like the implementation :/
What about a symfony/backport ?

Of course I'm not strongly against this hack, but if we could find a better alternative, this will be much better

@nicolas-grekas

This comment has been minimized.

Copy link
Member Author

nicolas-grekas commented Jan 2, 2019

Please, not another package to maintain. If you want, you can provide a command to 4.3 and then we could deprecate this one. Personally, I don't think it's worth the effort. dump-autoload is a Composer command, so would be dump-env. Both are run at the same stage, looks consistent to me.

@nicolas-grekas nicolas-grekas force-pushed the nicolas-grekas:dump-env branch from 4d92f7b to 7e561d5 Jan 21, 2019

@nicolas-grekas

This comment has been minimized.

Copy link
Member Author

nicolas-grekas commented Jan 21, 2019

Thank you @renanbr.

@nicolas-grekas nicolas-grekas merged commit 7e561d5 into symfony:master Jan 21, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

nicolas-grekas added a commit that referenced this pull request Jan 21, 2019

feature #449 Add "dump-env" command to compile .env files to .env.loc…
…al.php (nicolas-grekas, renanbr)

This PR was merged into the 1.2-dev branch.

Discussion
----------

Add "dump-env" command to compile .env files to .env.local.php

This adds a new command that compiles .env files to .env.local.php:
```
$ composer dump-env prod
Successfully dumped .env files in .env.local.php
```

The generated file is used in symfony/recipes#501

Commits
-------

7e561d5 add --empty option
31b12b1 Add "dump-env" command to compile .env files to .env.local.php

@nicolas-grekas nicolas-grekas deleted the nicolas-grekas:dump-env branch Feb 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.