Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hoangphidev/pre-commit

Laravel Pre-commit
https://github.com/hoangphidev/pre-commit

git-pre-commit laravel-package laravel-standard php-codesniffer php-standard pre-commit-hooks

Last synced: 4 days ago
JSON representation

Laravel Pre-commit

Awesome Lists containing this project

README

        

# Laravel Pre-commit

[![Latest Version on Packagist](https://img.shields.io/packagist/v/hoangphi/pre-commit.svg?style=flat-square)](https://packagist.org/packages/hoangphi/pre-commit)
[![Total Downloads](https://img.shields.io/packagist/dt/hoangphi/pre-commit.svg?style=flat-square)](https://packagist.org/packages/hoangphi/pre-commit)

## Installation

```bash
composer require hoangphi/pre-commit
```

Publish the configuration:

```bash
php artisan vendor:publish --provider="HoangPhi\PreCommit\Providers\PreCommitServiceProvider" --tag=config
```

### Config pre-commit hooks
```bash
php artisan pre-commit:install
```

- Create PSR default config `phpcs.xml` in your root project.

```bash
php artisan pre-commit:create-phpcs
```

- Added all changed files to git stage and run test manually.

```bash
php artisan pre-commit:check
```