simtabi/git-commit-checker

An opinionated coding standards, and syntax fixer for the Laravel framework with support for Git pre-commit hooks.

dev-master 2022-11-30 23:00 UTC

This package is auto-updated.

Last update: 2023-01-30 23:38:06 UTC


README

banner

Laravel GIT commit checker

An opinionated coding standards, and syntax fixer for the Laravel framework with support for Git pre-commit hooks.

Requirements

To be able to use this package you need to meet the following minimum requirements:

  1. Laravel framework >= v9
  2. PHP >= v8

Installation

composer require simtabi/git-commit-checker

For version <= 5.4:

Add to section providers of config/app.php:

// config/app.php
'providers' => [
    ...
    Simtabi\GitCommitChecker\Providers\GitCommitCheckerServiceProvider::class,
];

Publish the configuration:

php artisan vendor:publish --provider="Simtabi\GitCommitChecker\Providers\GitCommitCheckerServiceProvider" --tag=config

Install GIT hooks

php artisan git:install-hooks
  • Create default PSR config (It will create phpcs.xml in your root project).
php artisan git:create-phpcs
  • Run test manually (made sure you've added all changed files to git stage)
php artisan git:pre-commit

Contributors

License

MIT © Simtabi LLC