Skip to content

Releases: 26B/php-pre-commit

0.2.1

11 Aug 16:24
a253fb1
Compare
Choose a tag to compare

Fixing issue with the hook file path when using Composer ^2.2.2

v0.2.0

11 Jan 22:59
b5a1622
Compare
Choose a tag to compare

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.2 there is now a new constant available to reach the bin/ 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 .gitignore and composer.lock.

v0.1.0

10 Jan 16:42
54b5067
Compare
Choose a tag to compare

New things:

  • Add configuration instructions for Laravel projects.
  • Add automatic skipping when the git commit a from a merge action.
  • chmod right in the configuration script.

v0.0.5

15 Apr 13:41
Compare
Choose a tag to compare

Use local phpcs(in vendor/bin) over global if it's available.

v0.0.4

15 Apr 10:11
Compare
Choose a tag to compare

Only using colours in output if supported.

v0.0.3

07 Apr 17:55
Compare
Choose a tag to compare

Bug fix: Only staged .php files are considered now.

v0.0.2

31 Mar 12:05
Compare
Choose a tag to compare

Change script setup-hooks.sh into a vendor binary php-pre-commit.
Excluding deleted staged files from code fixing.

v0.0.1

29 Mar 11:52
Compare
Choose a tag to compare

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.