contao / managed-edition

Contao Managed Edition
17 stars 14 forks source link

Ignore parameters.yml inside /config folder #43

Closed m-vo closed 5 years ago

m-vo commented 5 years ago

This adds /config/parameters.yml to the project's .gitignore (in order to match Symfony 4 best practices not creating an app folder).

We could also remove the old line completely. This depends on how much we want people to embrace this practice I guess. :wink:

leofeyer commented 5 years ago

Using a parameters.yml file is a leftover from Symfony 3, therefore I would prefer not to merge this PR and switching to .env files instead.

https://symfony.com/blog/new-in-symfony-4-2-define-env-vars-per-environment

Of course, we have to continue to support app/config/parameters.yml to remain backwards compatible, but we should promote using an .env.local file instead of config/parameters.yml.

m-vo commented 5 years ago

Agreed. Shall we remove the existing line then altogether? (As the gitignore is only a helper and nothing critical.)

aschempp commented 5 years ago

see https://github.com/contao/contao/pull/605

fritzmg commented 5 years ago

Of course, we have to continue to support app/config/parameters.yml to remain backwards compatible, but we should promote using an .env.local file instead of config/parameters.yml.

Currently, .env.local only works if also an .env is present:

https://github.com/contao/contao/blob/13ca2333ab21821f25cba2c9d83ac846e1fadcac/manager-bundle/src/HttpKernel/ContaoKernel.php#L384-L386

// which seems to be required in any case, nvm ;)

leofeyer commented 5 years ago

See contao/contao#768.