gitignore icon indicating copy to clipboard operation
gitignore copied to clipboard

Edit Symfony template and added legacy in community

Open fsoedjede opened this issue 3 years ago • 2 comments

Reasons for making this change:

I'm not directly linked to the Symfony project. I'm just a contributor.

This change is based on my experience when creating a new project. GitHub suggest choosing a .gitignore template. In my case, I was creating a Symfony 5 project but the template I got contains deprecated lines.

The change I'm proposing is to use Versioned templates for Symfony gitignore.

  • Current version handled by existing gitignore: 2.x, 3.x, 4.x
  • Current version of Symfony 5.x

What I did is:

  1. Move the file Symfony.gitignore to community/PHP/Symfony4.gitignore

I chose only release which are LTS: https://symfony.com/releases

  1. Add a file name Symfony.gitignore which contains only Symfony 5 related ignores.

Links to documentation supporting these rule changes:

  • https://symfony.com/doc/5.4/reference/configuration/kernel.html#cache-directory
# Lines added
/var/cache/*
!var/cache/.gitkeep
  • https://symfony.com/doc/5.4/reference/configuration/kernel.html#log-directory & https://symfony.com/doc/5.4/logging.html#where-logs-are-stored
# Lines added
/var/log/*
!var/log/.gitkeep
  • https://symfony.com/doc/5.4/session.html#configuration
# Lines added
/var/sessions/*
!var/sessions/.gitkeep
  • https://symfony.com/doc/5.4/configuration/secrets.html#configuration
# Lines added
/config/secrets/prod/prod.decrypt.private.php
  • https://symfony.com/doc/5.4/configuration.html#overriding-environment-values-via-env-local
# Lines added
/.env.local
/.env.local.php
/.env.*.local
  • https://symfony.com/doc/5.4/testing.html
# Lines added
.phpunit.result.cache
/phpunit.xml
/phpunit.xml.dist
  • https://symfony.com/doc/5.4/frontend/encore/installation.html
# Lines added due to Node.js usage
/node_modules/
npm-debug.log
yarn-error.log

If this is a new template:

  • Link to application or project’s homepage: https://symfony.com

fsoedjede avatar Apr 07 '22 17:04 fsoedjede

@Github Please can you process this request because Symfony's gitignore is outdated (LTS is curently in v.5 not v.4) !

vinceAmstoutz avatar Jul 07 '22 07:07 vinceAmstoutz