Skip to content

Commit a80e595

Browse files
committed
README.md and CHANGELOG.md updated
1 parent a95628e commit a80e595

File tree

2 files changed

+122
-29
lines changed

2 files changed

+122
-29
lines changed

CHANGELOG.md

Lines changed: 96 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,100 @@
11
# Changelog
22

3-
All notable changes to `laravel-git-hooks` will be documented in this file
3+
All notable changes to `laravel-git-hooks` will be documented in this file.
44

5-
## 1.0.0 - 2023-XX-XX
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
67

7-
- initial release
8+
## [2.0.0] - 2024-09-24
9+
10+
### Added
11+
- Major Docker & Laravel Sail Support
12+
- Automatic Code Fixing capabilities with `automatically_fix_errors` and `rerun_analyzer_after_autofix` options
13+
- New Code Analyzers:
14+
- PHP CS Fixer support
15+
- Rector support
16+
- PHP Insights support
17+
- Performance improvements with chunked file processing
18+
- Configurable path validation
19+
- Enhanced debug options
20+
21+
### Changed
22+
- **Breaking:** Requires Laravel 11+ (dropped Laravel 10 support)
23+
- **Breaking:** Requires PHP 8.2+
24+
- **Breaking:** Renamed environment variables for consistency
25+
- Improved error handling and output
26+
27+
### Removed
28+
- **Breaking:** Removed Enlightn package integration
29+
30+
## [1.3.0] - 2024-04-13
31+
32+
### Changed
33+
- Improved Github actions pipelines
34+
- Updated Node.js version requirements
35+
- Replaced deprecated libraries with modern alternatives
36+
- Updated testing frameworks
37+
38+
## [1.2.0] - 2024-03-28
39+
40+
### Added
41+
- Laravel 11 Compatibility
42+
43+
## [1.1.2] - 2024-01-04
44+
45+
### Fixed
46+
- Removed Pint defaults for better customization
47+
- Fixed Pint style issues
48+
49+
## [1.1.1] - 2023-06-10
50+
51+
### Fixed
52+
- Code Analyzers fixed to consider only staged files (not all modified files)
53+
54+
## [1.1.0] - 2023-06-10
55+
56+
### Added
57+
- Artisan executable path configuration option
58+
- Laravel Zero support
59+
60+
### Fixed
61+
- Hook stub template for better compatibility
62+
63+
## [1.0.1] - 2023-05-07
64+
65+
### Changed
66+
- Updated package description
67+
68+
## [1.0.0] - 2023-05-07
69+
70+
### Added
71+
- Initial stable release
72+
- Pre-configured hooks for popular tools:
73+
- Laravel Pint
74+
- PHPCS with PHPCBF
75+
- ESLint
76+
- Prettier
77+
- Larastan
78+
- Enlightn
79+
- Blade Formatter
80+
- Git hooks management via Artisan commands
81+
- Custom hook generation with `git-hooks:make` command
82+
- Support for all Git hook types (pre-commit, prepare-commit-msg, commit-msg, post-commit, pre-push)
83+
- Comprehensive configuration options
84+
- Pipeline processing for sequential hook execution
85+
- >95% code coverage with Pest tests
86+
87+
## [0.1.1] - 2023-05-07
88+
89+
### Added
90+
- Pre-release version with basic functionality
91+
92+
[2.0.0]: https://github.com/igorsgm/laravel-git-hooks/compare/v1.3.0...v2.0.0
93+
[1.3.0]: https://github.com/igorsgm/laravel-git-hooks/compare/v1.2.0...v1.3.0
94+
[1.2.0]: https://github.com/igorsgm/laravel-git-hooks/compare/v1.1.2...v1.2.0
95+
[1.1.2]: https://github.com/igorsgm/laravel-git-hooks/compare/v1.1.1...v1.1.2
96+
[1.1.1]: https://github.com/igorsgm/laravel-git-hooks/compare/v1.1.0...v1.1.1
97+
[1.1.0]: https://github.com/igorsgm/laravel-git-hooks/compare/v1.0.1...v1.1.0
98+
[1.0.1]: https://github.com/igorsgm/laravel-git-hooks/compare/v1.0.0...v1.0.1
99+
[1.0.0]: https://github.com/igorsgm/laravel-git-hooks/compare/v0.1.1...v1.0.0
100+
[0.1.1]: https://github.com/igorsgm/laravel-git-hooks/releases/tag/v0.1.1

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424

2525
## ✨ Features
2626

27-
- **Pre-configured Hooks:** Laravel Git Hooks comes with pre-configured pre-commit hooks for popular tools, such as Laravel Pint, PHPCS, ESLint, Prettier, Larastan, Enlightn, Rector, PHP Insights and Blade Formatter, making it easy to enforce coding standards and style guidelines right away.
27+
- **Pre-configured Hooks:** Laravel Git Hooks comes with pre-configured pre-commit hooks for popular tools, such as Laravel Pint, PHPCS, ESLint, Prettier, Larastan, Enlightn, Rector, PHP Insights, and Blade Formatter, making it easy to enforce coding standards and style guidelines right away.
2828
- **Manage Git Hooks:** Easily manage your Git hooks in your Laravel projects with a streamlined and organized approach.
2929
- **Edit Commit Messages:** Gain control over your commit messages by customizing them to meet your project requirements and maintain a clean Git history.
3030
- **Create Custom Hooks:** Add and integrate custom hooks tailored to your specific project needs, ensuring better code quality and adherence to guidelines.
31-
- **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`
32-
- **Code Quality:** The package is thoroughly tested, with >95% of code coverage, ensuring its reliability and stability in a wide range of Laravel projects.
31+
- **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`, and `pre-push`.
32+
- **Code Quality:** The package is thoroughly tested with >95% code coverage, ensuring its reliability and stability in a wide range of Laravel projects.
3333
- **Docker support:** Each hook can be configured to either run locally or inside a Docker container, with full Laravel Sail integration.
3434
- **Auto-fix Capabilities:** Automatically fix code issues without manual intervention, with configurable re-run after fixes.
3535

@@ -42,21 +42,21 @@
4242
composer require igorsgm/laravel-git-hooks --dev
4343
```
4444

45-
- Publish the config file and customize it in the way you want:
45+
- Publish the config file and customize it as needed:
4646
```bash
4747
php artisan vendor:publish --tag=laravel-git-hooks
4848
```
4949

50-
- Now whenever you make a change in your `config/git-hooks.php` file, please register your git hooks by running the artisan command:
50+
- Now, whenever you make a change to your `config/git-hooks.php` file, register your Git hooks by running the Artisan command:
5151
```bash
5252
php artisan git-hooks:register
5353
```
5454

5555
Once you've configured and registered the hooks, you're all set!
5656

5757
## 2️⃣ General Usage
58-
### Usage of the configured pre-commit hooks
59-
To use the already created pre-commit hooks of this package, you can simply edit the `pre-commit` section of git-hooks.php config file. Here's an example of how to configure them:
58+
### Usage of the configured Pre-commit Hooks
59+
To use the pre-configured pre-commit hooks provided by this package, simply edit the `pre-commit` section of the `git-hooks.php` config file. Here's an example of how to configure them:
6060
```php
6161
'pre-commit' => [
6262
\Igorsgm\GitHooks\Console\Commands\Hooks\PintPreCommitHook::class, // Laravel Pint
@@ -73,16 +73,16 @@ To use the already created pre-commit hooks of this package, you can simply edit
7373

7474
### 🔧 Auto-fix Capabilities
7575

76-
By default the pre-commit hooks will stop at first failure and will not continue with the remaining tools.
77-
If the tool contains a fixer option it will prompt in the CLI to run the fix command.
76+
By default, the pre-commit hooks will stop at the first failure and will not continue with the remaining tools.
77+
If the tool contains a fixer option, it will prompt in the CLI to run the fix command.
7878

7979
The package includes powerful auto-fix functionality that can automatically resolve code style and formatting issues:
8080

8181
- **Interactive Fixing:** By default, when an issue is detected, you'll be prompted to run the fix command
8282
- **Automatic Fixing:** Enable `automatically_fix_errors` to fix issues without prompts
8383
- **Smart Re-running:** Enable `rerun_analyzer_after_autofix` to automatically verify fixes succeeded
8484

85-
This behavior can be adjusted using the following parameters from git-hooks.php config file:
85+
This behavior can be adjusted using the following parameters from the `git-hooks.php` config file:
8686
```php
8787
// config/git-hooks.php
8888
return [
@@ -95,19 +95,19 @@ return [
9595

9696
## 3️⃣ Advanced Usage
9797

98-
### 🐳 Laravel Sail support
98+
### 🐳 Laravel Sail Support
9999

100-
If you are using Laravel Sail and maybe not local PHP is installed, you can adjust the following parameters in the `git-hooks.php` config file.
100+
If you are using Laravel Sail and local PHP is not installed, you can adjust the following parameters in the `git-hooks.php` config file.
101101
This will force the local git hooks to use the `sail` command to execute the hooks:
102102
```php
103103
// config/git-hooks.php
104104
'use_sail' => env('GITHOOKS_USE_SAIL', false),
105105
```
106106

107107

108-
### 🐳 Docker support
108+
### 🐳 Docker Support
109109

110-
By default, commands are executed locally, however this behavior can be adjusted for each hook using the parameters `run_in_docker` and `docker_container`:
110+
By default, commands are executed locally; however, this behavior can be adjusted for each hook using the parameters `run_in_docker` and `docker_container`:
111111

112112
```php
113113
// config/git-hooks.php
@@ -117,8 +117,8 @@ By default, commands are executed locally, however this behavior can be adjusted
117117

118118
### 🔧🪲 Advanced Configuration Options & Debug Mode
119119

120-
The git-hooks.php config file offers several debug options that can be adjusted using the following parameters.
121-
It also provides additional configuration options for fine-tuning hook behavior.
120+
The `git-hooks.php` config file offers several debug options that can be adjusted using the following parameters.
121+
It also provides additional configuration options for fine-tuning hook behavior:
122122

123123
```php
124124
// config/git-hooks.php
@@ -143,14 +143,14 @@ return [
143143
```
144144
This command will prompt you to choose the type of hook you want to create (e.g., `pre-commit`, `post-commit`, etc.) and to provide a name for the hook. Once you've provided the required information, the command will generate a new hook class in the `app/Console/GitHooks` directory.
145145
2) To start using your custom hook, open the generated file and implement the `handle()` method with your desired logic.
146-
3) Add your custom hook to the appropriate array in the git-hooks.php config file:
146+
3) Add your custom hook to the appropriate array in the `git-hooks.php` config file:
147147
```php
148148
'pre-commit' => [
149149
// Other pre-commit hooks...
150150
\App\Console\GitHooks\MyCustomPreCommitHook::class,
151151
],
152152
```
153-
4) Finally register your custom hook by running the artisan command:
153+
4) Finally, register your custom hook by running the Artisan command:
154154
```bash
155155
php artisan git-hooks:register
156156
```
@@ -249,8 +249,8 @@ class MyPrepareCommitMessageHook implements \Igorsgm\GitHooks\Contracts\MessageH
249249
```
250250
251251
### Commit-msg Hook
252-
> The commit-msg hook takes one parameter, which again is the path to a temporary file that contains the commit message
253-
> written by the developer. If this script exits non-zero, Git aborts the commit process, so you can use
252+
> The commit-msg hook takes one parameter, which is the path to a temporary file that contains the commit message
253+
> written by the developer. If this script exits non-zero, Git aborts the commit process, so you can use it to validate the commit message format.
254254
255255
256256
```php
@@ -283,12 +283,12 @@ return [
283283
```
284284
285285
```php
286-
// App/Console/GitHooks/MyPrepareCommitMessageHook.php
286+
// App/Console/GitHooks/MyPostCommitHook.php
287287
288288
namespace App\Console\GitHooks;
289289
290290
use Closure;
291-
use Igorsgm\GitHooks\Git\CommitMessage;
291+
use Igorsgm\GitHooks\Git\Log;
292292
use Igorsgm\GitHooks\Contracts\PostCommitHook;
293293
294294
class MyPostCommitHook implements \Igorsgm\GitHooks\Contracts\PostCommitHook
@@ -316,7 +316,7 @@ class MyPostCommitHook implements \Igorsgm\GitHooks\Contracts\PostCommitHook
316316
317317
### Pre-push Hook
318318
> The pre-push hook runs during git push, after the remote refs have been updated but before any objects have been
319-
transferred. It receives the name and location of the remote as parameters, and a list of to-be-updated refs through
319+
> transferred. It receives the name and location of the remote as parameters, and a list of to-be-updated refs through
320320
stdin. You can use it to validate a set of ref updates before a push occurs (a non-zero exit code will abort the push).
321321
322322
```php
@@ -330,7 +330,7 @@ return [
330330
];
331331
```
332332
333-
The class structure of the `pre-push` hooks is the same as the `post-commit` hook shown right above, but implementing `\Igorsgm\GitHooks\Contracts\PrePushHook` interface.
333+
The class structure of the `pre-push` hooks is the same as the `post-commit` hook shown above, but implementing `\Igorsgm\GitHooks\Contracts\PrePushHook` interface.
334334
335335
## 🧪 Testing
336336
@@ -340,10 +340,10 @@ composer test
340340
341341
## Changelog
342342
343-
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
343+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
344344
345345
346-
## Original authors
346+
## Original Authors
347347
348348
- [Igor Moraes](https://github.com/igorsgm)
349349
- [Pavel Buchnev](https://github.com/butschster)

0 commit comments

Comments
 (0)