hungthai1401 / laravel-pre-commit
A git pre-commit hook to Laravel apps.
1.0.0
2020-05-23 09:44 UTC
Requires
- php: >=7.0.0
- illuminate/console: ^5.5|^6|^7
- illuminate/support: ^5.5|^6|^7
- php-parallel-lint/php-console-highlighter: dev-master
- php-parallel-lint/php-parallel-lint: dev-master
- squizlabs/php_codesniffer: ^3.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- orchestra/testbench: ^3.5|^4|^5
- phpunit/phpunit: ^6.0|^7.0|^8.0|^9.0
- spatie/phpunit-snapshot-assertions: ^1|^2|^3|^4
This package is auto-updated.
Last update: 2025-01-05 11:14:53 UTC
README
Installation
To install through Composer, by run the following command:
composer require hungthai1401/laravel-pre-commit --dev
The package will automatically register a service provider and alias.
Optionally, publish the package's configuration file by running:
php artisan vendor:publish --provider="HT\PreCommit\Providers\PreCommitServiceProvider" --tag=config
Usage
- Install git pre-commit hook:
php artisan git:pre-commit-hook:install
- Publish default PSR config (It will be create phpcs.xml in your root project.).
php artisan git:publish-phpcs
- Run test manually (made sure that you've added all changed files to git stage)
php artisan git:pre-commit