slam / alert-on-composerlock-change
Composer plugin that alerts (in dev) that composer.lock changed and so the developer should run `composer install`
Installs: 6 144
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:composer-plugin
Requires
- php: ^7.1.0
- composer-plugin-api: ^1.0.0
Requires (Dev)
- composer/composer: ^1.6.4
- phpunit/phpunit: ^7.1
Conflicts
This package is auto-updated.
Last update: 2020-09-06 15:32:54 UTC
README
...when commanding a git pull
, git checkout
or a git merge
Show an alert when composer.lock
changed while moving between commits.
Installation
To use this extension, require it in Composer:
composer require --dev slam/alert-on-composerlock-change
WARNING: git hooks overridden !
To enable the warning both .git/hooks/post-merge
and .git/hooks/post-checkout
are overridden.
Where to use it
This is useful in development, you clone the repo and you'll automatically
notified on composer.lock
changes without custom hooks/code (after the
first composer install
of course).
The alert is triggered also while moving between commits with git checkout
.
Where NOT to use it
You should avoid relying on this in production, as you are supposed to have a
dedicated strategy for deploy that involves much more than a plain git pull
.
Also this isn't useful for a library, as libraries shouldn't commit the composer.lock
.
Why not just run composer install
?
This is intended to help developers be aware of what happened in the repo while they where sleeping (uh?). Developers are supposed to investigate how the dependencies changed, to be aware of them and, if needed, to discuss the changes and improve them. If everything happens under the hood, knowledge would be much slower to gain.