Releases: 26B/php-pre-commit
0.2.1
v0.2.0
This release aims to provide support for composer@^2.2 which introduced a new way to deal with binaries that changed how the commands such as cd "${0%[/\\]*}" resolved paths. For this it is considered a breaking change, hence the bump in version, but it should work with earlier composer versions.
Change highlights:
- After a few corrections, as of
composer@^2.2.2there is now a new constant available to reach thebin/directory (more in a4a51b9). - Don't break script when one of the paths can't be resolved.
- Improve git path validation to include checking up to the
hooks/folder not just.git/. - Improve error messages.
- Add
.gitignoreandcomposer.lock.
v0.1.0
New things:
- Add configuration instructions for Laravel projects.
- Add automatic skipping when the git commit a from a merge action.
chmodright in the configuration script.
v0.0.5
Use local phpcs(in vendor/bin) over global if it's available.
v0.0.4
Only using colours in output if supported.
v0.0.3
Bug fix: Only staged .php files are considered now.
v0.0.2
Change script setup-hooks.sh into a vendor binary php-pre-commit.
Excluding deleted staged files from code fixing.
v0.0.1
First Release.
Git's pre-commit hook to fix .php staged files via PHP_CodeSniffer according to its config file (phpcs.xml). And a script to move this hook file into git's hooks folder.