Skip to content

Commit 836d942

Browse files
committed
README.md updated
1 parent 6050c21 commit 836d942

File tree

1 file changed

+50
-17
lines changed

1 file changed

+50
-17
lines changed

README.md

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
<p align="center">A powerful and easy-to-use package for managing Git hooks within your Laravel projects. Improve your code quality, reduce the time spent on code reviews, and catch potential bugs before they make it into your repository.</p>
44

55
<p align="center">
6-
<a href="https://packagist.org/packages/indy2kro/laravel-git-hooks">
7-
<img src="https://img.shields.io/packagist/v/indy2kro/laravel-git-hooks.svg?style=flat-square" alt="Latest Version on Packagist">
6+
<a href="https://packagist.org/packages/igorsgm/laravel-git-hooks">
7+
<img src="https://img.shields.io/packagist/v/igorsgm/laravel-git-hooks.svg?style=flat-square" alt="Latest Version on Packagist">
88
</a>
9-
<a href="https://github.com/indy2kro/laravel-git-hooks/actions/workflows/main.yml/badge.svg">
10-
<img src="https://img.shields.io/github/actions/workflow/status/indy2kro/laravel-git-hooks/main.yml?style=flat-square" alt="Build Status">
9+
<a href="https://github.com/igorsgm/laravel-git-hooks/actions/workflows/main.yml/badge.svg">
10+
<img src="https://img.shields.io/github/actions/workflow/status/igorsgm/laravel-git-hooks/main.yml?style=flat-square" alt="Build Status">
1111
</a>
12-
<img src="https://img.shields.io/scrutinizer/coverage/g/indy2kro/laravel-git-hooks/master?style=flat-square" alt="Test Coverage">
13-
<img src="https://img.shields.io/scrutinizer/quality/g/indy2kro/laravel-git-hooks/master?style=flat-square" alt="Code Quality">
14-
<a href="https://packagist.org/packages/indy2kro/laravel-git-hooks">
15-
<img src="https://img.shields.io/packagist/dt/indy2kro/laravel-git-hooks.svg?style=flat-square" alt="Total Downloads">
12+
<img src="https://img.shields.io/scrutinizer/coverage/g/igorsgm/laravel-git-hooks/master?style=flat-square" alt="Test Coverage">
13+
<img src="https://img.shields.io/scrutinizer/quality/g/igorsgm/laravel-git-hooks/master?style=flat-square" alt="Code Quality">
14+
<a href="https://packagist.org/packages/igorsgm/laravel-git-hooks">
15+
<img src="https://img.shields.io/packagist/dt/igorsgm/laravel-git-hooks.svg?style=flat-square" alt="Total Downloads">
1616
</a>
1717
</p>
1818

@@ -32,13 +32,16 @@ This is a fork of <a href="https://github.com/igorsgm/laravel-git-hooks">igorsgm
3232
- **Create Custom Hooks:** Add and integrate custom hooks tailored to your specific project needs, ensuring better code quality and adherence to guidelines.
3333
- **Artisan Command for Hook Generation:** The package includes a convenient Artisan command that allows you to effortlessly generate new hooks of various types. Such as: `pre-commit`, `prepare-commit-msg`, `commit-msg`, `post-commit`, `pre-push`
3434
- **Code Quality:** The package is thoroughly tested, with >95% of code coverage, ensuring its reliability and stability in a wide range of Laravel projects.
35-
- **Docker support:** Each hook can be configured to either run locally or inside a docker container.
35+
- **Docker support:** Each hook can be configured to either run locally or inside a Docker container, with full Laravel Sail integration.
36+
- **Auto-fix Capabilities:** Automatically fix code issues without manual intervention, with configurable re-run after fixes.
3637

3738
## 1️⃣ Installation
3839

40+
**Laravel Version Support:** This package supports Laravel 11 and Laravel 12. Laravel 10 support has been deprecated.
41+
3942
- You can install the package via composer:
4043
```bash
41-
composer require indy2kro/laravel-git-hooks --dev
44+
composer require igorsgm/laravel-git-hooks --dev
4245
```
4346

4447
- Publish the config file and customize it in the way you want:
@@ -62,7 +65,7 @@ To use the already created pre-commit hooks of this package, you can simply edit
6265
\Igorsgm\GitHooks\Console\Commands\Hooks\PHPCodeSnifferPreCommitHook::class, // PHPCS (with PHPCBF autofixer)
6366
\Igorsgm\GitHooks\Console\Commands\Hooks\PHPCSFixerPreCommitHook::class, // PHP CS Fixer
6467
\Igorsgm\GitHooks\Console\Commands\Hooks\LarastanPreCommitHook::class, // Larastan
65-
\Igorsgm\GitHooks\Console\Commands\Hooks\EnlightnPreCommitHook::class, // Enlightn
68+
// \Igorsgm\GitHooks\Console\Commands\Hooks\EnlightnPreCommitHook::class, // Enlightn
6669
\Igorsgm\GitHooks\Console\Commands\Hooks\ESLintPreCommitHook::class, // ESLint
6770
\Igorsgm\GitHooks\Console\Commands\Hooks\PrettierPreCommitHook::class, // Prettier
6871
\Igorsgm\GitHooks\Console\Commands\Hooks\PhpInsightsPreCommitHook::class, // PhpInsights
@@ -165,6 +168,35 @@ By default commands are executed locally, however this behavior can be adjusted
165168
'docker_container' => env('LARAVEL_PINT_DOCKER_CONTAINER', 'app'),
166169
```
167170

171+
### Advanced Configuration Options
172+
173+
The package provides additional configuration options for fine-tuning hook behavior:
174+
175+
```php
176+
/*
177+
|--------------------------------------------------------------------------
178+
| Validate paths
179+
|--------------------------------------------------------------------------
180+
|
181+
| This configuration option allows you to validate paths before executing
182+
| hooks, ensuring that files exist before attempting to process them.
183+
|
184+
*/
185+
'validate_paths' => env('GITHOOKS_VALIDATE_PATHS', true),
186+
187+
/*
188+
|--------------------------------------------------------------------------
189+
| Analyzer chunk size
190+
|--------------------------------------------------------------------------
191+
|
192+
| This configuration option allows you to configure the chunk size for
193+
| processing files in batches. This can improve performance for repositories
194+
| with many files.
195+
|
196+
*/
197+
'analyzer_chunk_size' => env('GITHOOKS_ANALYZER_CHUNK_SIZE', 100),
198+
```
199+
168200
### Creating Custom Git Hooks
169201
1) If you need to create a custom Git hook for your project, Laravel Git Hooks makes it easy with the `git-hooks:make` Artisan command. To create a new custom hook, simply run the following command:
170202
```bash
@@ -371,19 +403,20 @@ composer test
371403
372404
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
373405
406+
407+
# Original authors:
408+
409+
- [Igor Moraes](https://github.com/igorsgm)
410+
- [Pavel Buchnev](https://github.com/butschster)
411+
374412
## Contributing
375413
376414
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
377415
378-
## Credits
416+
### Credits
379417
380418
- [Cristian Radu](https://github.com/indy2kro)
381419
382-
Original authors:
383-
384-
- [Igor Moraes](https://github.com/igorsgm)
385-
- [Pavel Buchnev](https://github.com/butschster)
386-
387420
## License
388421
389422
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

0 commit comments

Comments
 (0)