Sylius-Standard icon indicating copy to clipboard operation
Sylius-Standard copied to clipboard

Remove `composer.lock` from `.gitignore`

Open rimas-kudelis opened this issue 3 years ago • 3 comments

The .gitignore file, that is currently shipped, references composer.lock. This is very easy to miss after cloning the repo, and might end up with uncommitted composer.lock in actual downstream projects, at least initially. Perhaps there is a better way to prevent composer.lock from being committed here, while not excluding it from downstream projects by default?

rimas-kudelis avatar Jan 25 '22 10:01 rimas-kudelis

Maybe a Composer script on post-create-project-cmd? Can't think of anything else.

vvasiloi avatar Jan 25 '22 12:01 vvasiloi

Maybe a Git hook.

vvasiloi avatar Jan 25 '22 12:01 vvasiloi

post-create-project-cmd would only work with when composer create-project is used, which, at least for me, is not usually the case (although maybe I should get used to using it instead of just git clone'ing the repo I need).

A Git hook would be a more universal approach from the end-user point of view, but I guess it would be a bit more annoying for the maintainers.

rimas-kudelis avatar Jan 25 '22 12:01 rimas-kudelis

This is very easy to miss after cloning the repo, and might end up with uncommitted composer.lock in actual downstream projects

I'm trying Sylius for the first time and that's exactly what happened. A co-worker added a package and the changes to the composer.lock file didn't get commited so it broke my instance as doing composer install didn't detect that there is a new dependency to install.

artyuum avatar Oct 19 '22 11:10 artyuum

@rimas-kudelis @jakubtobiasz hi, looks like issue can be closed after last PR

diimpp avatar Feb 25 '23 08:02 diimpp

Yup, thanks for reminding :).

jakubtobiasz avatar Feb 25 '23 10:02 jakubtobiasz