2017 © Pedro Peláez
 

library laravel-git-hooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

image

mr-feek/laravel-git-hooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  • Sunday, April 15, 2018
  • by mr-feek
  • Repository
  • 2 Watchers
  • 5 Stars
  • 386 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 2 Open issues
  • 17 Versions
  • 14 % Grown

The README.md

Laravel Git Hooks

![Laravel Git Hooks](https://i.imgur.com/guHu5ep.png) , (*1)

This is a community project and not an "official" Laravel one

Latest Stable Version Total Downloads License Build Status, (*2)

This package provides a way to add custom git hooks to your laravel project. Easily configure any command to be fired throughout the git-hook process. Want to ensure that all tests pass before a bad commit is pushed? Now's your chance!, (*3)

Currently, the following git hooks are supported: - pre-commit - prepare-commit-msg - pre-push - post-checkout, (*4)

Install

Via Composer, (*5)

``` bash $ composer require mr-feek/laravel-git-hooks --dev, (*6)


Edit your laravel project's `composer.json` so that these hooks are installed for every developer after they use composer.

"post-autoload-dump": [ ... "@php artisan hooks:install" ], (*7)


## Configuration - Publish this package's configuration file: `php artisan vendor:publish --provider="Feek\LaravelGitHooks\LaravelGitHooksServiceProvider"` - Register specific artisan commands to be run in the configuration array. For example, all commands nested within the `pre-commit` array key will be run prior to a git commit. All commands nested within the `pre-push` array key will be run prior to a git push. If any of these registered commands fail, then the git action will be prevented. ```php <?php return [ 'commit-msg' => [ // ], 'pre-commit' => [ 'php artisan hooks:phpcs --diff --proxiedArguments="-p -n --standard=PSR2"', 'php artisan hooks:eslint --diff --proxiedArguments="--fix --quiet"', ], 'pre-push' => [ './vendor/bin/phpunit' ], 'post-checkout' => [ 'php artisan hooks:install-deps' ], 'prepare-commit-msg' => [ 'php artisan hooks:semantic-commits', ], ];

Commands

This package ships with several handy artisan commands which work nicely as git hooks. The following commands come included: - phpcs - phpcbf - phpstan - If you are using this command, you will have a much better experience by creating a custom phpstan.neon file - install dependencies (composer, yarn, npm) - eslint - semantic commit messages, (*8)

Sniffer Commands

The PHPCS, PHPCBF, PHPSTAN, and ESLINT commands all allow you to pass arguments to the underlying process being executed. You can utilize this via the --proxiedArguments flag. In the code examples above, the following phpcs command will be executed: phpcs -p -n --standard=PSR2, (*9)

Supported Versions Of Laravel

Laravel ^5.5 is actively supported. Need support for earlier versions of Laravel? Feel free to open a PR, (*10)

Change log

Please see CHANGELOG for more information on what has changed recently., (*11)

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details., (*12)

Wondering how to go about working on a laravel package? See http://laraveldaily.com/how-to-create-a-laravel-5-package-in-10-easy-steps/ and https://laravel.com/docs/5.5/packages, (*13)

Credits

License

The MIT License (MIT). Please see License File for more information, (*14)

The Versions

15/04 2018

dev-master

9999999-dev https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

01/04 2018

v0.5.1

0.5.1.0 https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

26/11 2017

v0.5.0

0.5.0.0 https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

25/10 2017

dev-install-deps-dev

dev-install-deps-dev https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

20/10 2017

v0.4.0

0.4.0.0 https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

24/09 2017

v0.3.1

0.3.1.0 https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

24/09 2017

v0.3.0

0.3.0.0 https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

24/09 2017

v0.2.7

0.2.7.0 https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

18/09 2017

v0.2.6

0.2.6.0 https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

17/09 2017

v0.2.5

0.2.5.0 https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

17/09 2017

v0.2.4

0.2.4.0 https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

17/09 2017

v0.2.3

0.2.3.0 https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

17/09 2017

v0.2.2

0.2.2.0 https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

17/09 2017

v0.2.1

0.2.1.0 https://github.com/mr-feek/LaravelGitHooks

A simple laravel package for adding custom git hooks to your laravel projects. Ships with phpunit, phpcs, and eslint

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel git hooks feek laravelgithooks laravel phpunit laravel phpcs laravel hooks

16/09 2017
15/09 2017

v0.1.0

0.1.0.0 https://github.com/mr-feek/LaravelGitHooks

git hooks for laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

feek laravelgithooks

05/09 2017

v0.0.1

0.0.1.0 https://github.com/mr-feek/LaravelGitHooks

git hooks for laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

feek laravelgithooks