devdocs
devdocs copied to clipboard
app/etc/config.php tracking in VCS - docs conflict with links to .gitignore
Track app/etc/config.php or not?
Topic Link
https://devdocs.magento.com/guides/v2.4/config-guide/prod/config-reference-gitignore.html
Description
The references to .gitignore found here: https://devdocs.magento.com/guides/v2.4/config-guide/prod/config-reference-gitignore.html and https://devdocs.magento.com/guides/v2.3/config-guide/prod/config-reference-gitignore.html are:
- https://raw.githubusercontent.com/magento/magento2/2.4/.gitignore
- https://raw.githubusercontent.com/magento/magento2/2.3/.gitignore
Which contain a reference to ignore app/etc/config.php : https://github.com/magento/magento2/blob/2.4-develop/.gitignore#L18
However, there are several statements throughout devdocs that would lead to an assumption that this app/etc/config.php file would not be set for ignore by VCS in .gitignore for 2.3 and 2.4 CE:
Reference 1: https://devdocs.magento.com/guides/v2.4/config-guide/deployment/pipeline/production-system.html
- Make sure all of the following are included in source control:
- app/etc/config.php
Reference 2: https://devdocs.magento.com/guides/v2.4/config-guide/deployment/pipeline/example/shared-configuration.html
Generate the shared configuration file, app/etc/config.php, in your development system and transfer it using source control to your build system as discussed in this section
Reference 3: https://devdocs.magento.com/guides/v2.4/config-guide/deployment/pipeline/technical-details.html
Manage the shared configuration The shared configuration is stored in app/etc/config.php, which should be in source control.
Reference 4: https://devdocs.magento.com/guides/v2.4/config-guide/prod/config-reference-most.html
The magento app:config:dump command writes these values to the shared configuration file, app/etc/config.php, which should be in source control.
Possible solutions
One of:
- make it clear that
app/etc/config.phpneeds to be explicitly added to VCS tracking - Remove the line ignoring
app/etc/config.phpfrom the .gitignore file,
Additional information
Hi @df2k2. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.
Please, add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.
It was reported on the magento2 repo to remove the config.php file again from the .gitignore file, but no idea if something will be done with it, the issue has been open for quite a while now and is a bit messy (the messy part is probably my fault 😛)
@jfrontain can you take a look?