Strip rules for PHP frameworks' installed files #985
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some of the templates for PHP frameworks have a problem in that they list all the files from the standard installation of the framework along with files which are sensible to ignore. In particular, I'm referring to the templates for: Magento, Joomla, Drupal, LemonStand, SugarCRM, Symfony, and ZendFramework. I see several problems with this pattern:
I'm aware that these frameworks are partly responsible because they encourage users to lump the framework's source with their particular instantiation (app) rather than leaning on proper dependency tools (as is done with, say, rails and bundler) making it difficult to version the two separately. However I don't think that we should be encouraging this usage pattern with the templates here.
A better solution to the problem would be to use a PHP dependency manager if possible, or something along the lines of the script proposed in #677, which generates a gitignore automatically from the framework rather than needing to know the source tree of that particular version a priori.
There is still merit in ignoring cache or upload directories, for example, so there is still a call for gitignore templates, but the installed files rules don't have a place in them. If we can agree on this direction, then I'll also address the other templates in the above list.