PHPackages                             hoangphi/pre-commit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. hoangphi/pre-commit

ActiveLibrary[Testing &amp; Quality](/categories/testing)

hoangphi/pre-commit
===================

Check coding standard &amp; code syntax before commit.

v1.0.2(3y ago)3637MITPHPPHP ^7.1.3|^8.0|^8.1|^8.2

Since Sep 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/hoangphidev/pre-commit)[ Packagist](https://packagist.org/packages/hoangphi/pre-commit)[ RSS](/packages/hoangphi-pre-commit/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (4)Versions (6)Used By (0)

Laravel Pre-commit
==================

[](#laravel-pre-commit)

[![Latest Version on Packagist](https://camo.githubusercontent.com/250a4cca015dd4aa019eceb5f73d81e635c316bac63d822fbc323d8df17f6346/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f616e677068692f7072652d636f6d6d69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hoangphi/pre-commit)[![Total Downloads](https://camo.githubusercontent.com/714d776d646d99f60e924a8ad3ec02a5f7c1433e9d0bfe6265e9146ac034ea1e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686f616e677068692f7072652d636f6d6d69742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hoangphi/pre-commit)

Installation
------------

[](#installation)

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

Publish the configuration:

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

### Config pre-commit hooks

[](#config-pre-commit-hooks)

```
php artisan pre-commit:install
```

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

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

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

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

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~132 days

Total

3

Last Release

1118d ago

PHP version history (2 changes)v1.0.0PHP ^7.1.3|^8.0|^8.1

v1.0.2PHP ^7.1.3|^8.0|^8.1|^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/557a3eb75039e39d7f1635b552a16aa969390decd1aeeb8f92edce1ee2951289?d=identicon)[HoangPhi](/maintainers/HoangPhi)

---

Top Contributors

[![amaisphihoang](https://avatars.githubusercontent.com/u/146047625?v=4)](https://github.com/amaisphihoang "amaisphihoang (4 commits)")[![hoangphidev](https://avatars.githubusercontent.com/u/32218935?v=4)](https://github.com/hoangphidev "hoangphidev (2 commits)")

---

Tags

git-pre-commitlaravel-packagelaravel-standardphp-codesnifferphp-standardpre-commit-hooksgit pre-commitphp coding standardphp code syntaxphp git commit checker

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hoangphi-pre-commit/health.svg)

```
[![Health](https://phpackages.com/badges/hoangphi-pre-commit/health.svg)](https://phpackages.com/packages/hoangphi-pre-commit)
```

###  Alternatives

[slevomat/coding-standard

Slevomat Coding Standard for PHP\_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.

1.5k134.0M2.3k](/packages/slevomat-coding-standard)[wp-cli/wp-cli-tests

WP-CLI testing framework

423.1M142](/packages/wp-cli-wp-cli-tests)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13191.0k8](/packages/youwe-testing-suite)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.9k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
