Pre-commit git hook to help keep code within PHP standards.
MIT License
Bot releases are visible (Hide)
Fixing issue with the hook file path when using Composer ^2.2.2
Published by xipasduarte almost 3 years ago
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:
composer@^2.2.2
there is now a new constant available to reach the bin/
directory (more in https://github.com/26B/php-pre-commit/commit/a4a51b9e764a011503d837d64eb5fe2e4a3af640).hooks/
folder not just .git/
..gitignore
and composer.lock
.Published by xipasduarte almost 3 years ago
New things:
chmod
right in the configuration script.Published by goncaloasimoes over 3 years ago
Use local phpcs
(in vendor/bin) over global if it's available.
Published by goncaloasimoes over 3 years ago
Only using colours in output if supported.
Published by goncaloasimoes over 3 years ago
Bug fix: Only staged .php
files are considered now.
Published by goncaloasimoes over 3 years ago
Change script setup-hooks.sh
into a vendor binary php-pre-commit
.
Excluding deleted staged files from code fixing.
Published by goncaloasimoes over 3 years ago
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.