php-pre-commit

Pre-commit git hook to help keep code within PHP standards.

MIT License

Downloads
2.8K
Stars
7
Committers
4

Bot releases are hidden (Show)

php-pre-commit - 0.2.1 Latest Release

Published by goncaloasimoes about 2 years ago

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

php-pre-commit - v0.2.0

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:

php-pre-commit - v0.1.0

Published by xipasduarte almost 3 years ago

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.
php-pre-commit - v0.0.5

Published by goncaloasimoes over 3 years ago

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

php-pre-commit - v0.0.4

Published by goncaloasimoes over 3 years ago

Only using colours in output if supported.

php-pre-commit - v0.0.3

Published by goncaloasimoes over 3 years ago

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

php-pre-commit - v0.0.2

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.

php-pre-commit - v0.0.1

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.

Package Rankings
Top 21.29% on Packagist.org