Should Symfony's 'bin' directory be ignored by git?
Symfony 3
In the Symfony 3 Standard Edition, the purpose of the bin
directory has been slightly changed. Binaries from Composer packages (such as phpunit
) are no longer installed in the bin
directory, but in vendor/bin
. Instead, the bin
directory contains the console
and symfony_requirements
executables (and whatever executable files you add yourself).
Because these files should be committed to your Git repository, you should no longer have the bin
directory in your .gitignore
file.
EDIT: This is answer is only applicable to Symfony 2. For Symfony 3 and later see Nic Wortels answer below.
Is it indeed recommended to let git ignore this directory and it's contents, and is Symfony's documentation simply not up-to-date?
This is indeed the case. The bin
directory is the same as the vendor directory, it depends on your requirements. It should be ignored. Except if you are going to put custom files in it (e.g. you move app/console
to bin/symfony
), then it should be ignored except from those custom files.
The Symfony2.gitignore
file from GitHub had it's last update 2 years ago. In those 2 years, a lot of things happend (like using Composer with Symfony2). I wouldn't recommend using it as an example.
The docs were indeed not up-to-date, if you hit the "edit" button in the docs you can update it yourself. I'll be very happy if you do that! :)