Put this to
git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD | grep composer.lock > /dev/null
if [ $? -eq 0 ]
This script will check if
composer.lock was modified, if yes
composer install will by executed.
Also this snippet can be used as a
composer command must be available in your OS.