Hi,
Should composer.lock be added to .gitignore?
It may be different for different extensions. In ContentTranslation we currently only have: "require": { "php": ">=5.3.0", "composer/installers": ">=1.0.1" },
I don't know much about Composer, but it looks like nothing more than the bare minimum. Should composer.lock be version-controlled in such a situation?
-- Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי http://aharoni.wordpress.com “We're living in pieces, I want to live in peace.” – T. Moore
On 02/23/2015 08:34 AM, Amir E. Aharoni wrote:
Hi,
Should composer.lock be added to .gitignore?
IMO yes. I had removed it from some extensions in the past IIRC.
It may be different for different extensions. In ContentTranslation we currently only have: "require": { "php": ">=5.3.0", "composer/installers": ">=1.0.1" },
I don't know much about Composer, but it looks like nothing more than the bare minimum. Should composer.lock be version-controlled in such a situation?
If you are using composer to install extensions, I would say yes, it should be ignored. In that case the extension is basically a library, and composer will just ignore the lock file when installing, so it ends up being misleading[1].
If you are using composer to manage development dependencies like phpcs or phpunit, then maybe, though I personally would prefer to ignore it.
[1] https://getcomposer.org/doc/02-libraries.md#lock-file
-- Legoktm
wikitech-l@lists.wikimedia.org