Adding the composer.lock in the repository is a best practice : https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file