PHPackages                             mcampbell508/git-review - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mcampbell508/git-review

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mcampbell508/git-review
=======================

An extendable framework for version control hooks.

6.0.0(8y ago)811[9 issues](https://github.com/mcampbell508/git-review/issues)MITPHPPHP ^7.1

Since Jul 20Pushed 8y ago2 watchersCompare

[ Source](https://github.com/mcampbell508/git-review)[ Packagist](https://packagist.org/packages/mcampbell508/git-review)[ RSS](/packages/mcampbell508-git-review/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (13)Versions (27)Used By (0)

git-review
==========

[](#git-review)

[![Build Status](https://camo.githubusercontent.com/84aa31aa12ad4c20853739529a7d214205286903ab7c6b8425182e0a9a5dc57b/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f6d63616d7062656c6c3530382f6769742d7265766965772e737667)](https://travis-ci.org/mcampbell508/git-review)[![Total Downloads](https://camo.githubusercontent.com/f88b42c0ac9b2be63a1715f0c43fc0a1e7a7a1dee29bf74520e932ee415ed9c3/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6d63616d7062656c6c3530382f6769742d7265766965772e737667)](https://packagist.org/packages/mcampbell508/git-review)[![Latest Stable Version](https://camo.githubusercontent.com/d992f4defbe5f44ffe11a18f7311ef4303b983689bc15f287cf99b0e1d986550/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d63616d7062656c6c3530382f6769742d7265766965772e737667)](https://packagist.org/packages/mcampbell508/git-review)[![License](https://camo.githubusercontent.com/5a911ddcd16b9110e7821386ffd8d637005a8b856c14a3c0861b955e91da4eba/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d6c69676874677265792e737667)](https://github.com/sjparkinson/static-review/blob/master/LICENSE)

This package was forked from [Static Review](https://github.com/sjparkinson/git-review) which has been abandoned. I am using this as a personal project and have renamed to `git-review`

---

An extendable framework for version control hooks.

[![GitReview Success Demo](https://camo.githubusercontent.com/faba08c2c5caf9afdcbf38a149d33664d66a6119d6d0a8d46cb41452b6092cac/687474703a2f2f692e696d6775722e636f6d2f384733754f52702e676966)](https://camo.githubusercontent.com/faba08c2c5caf9afdcbf38a149d33664d66a6119d6d0a8d46cb41452b6092cac/687474703a2f2f692e696d6775722e636f6d2f384733754f52702e676966)

Requirements
------------

[](#requirements)

- PHP 7.1 and greater

Usage
-----

[](#usage)

For a [composer](https://getcomposer.org/) managed project you can simply run the following ...

```
$ composer require mcampbell508/git-review
```

Hooks can then be installed like so ...

```
$ vendor/bin/git-review.php hook:install vendor/mcampbell508/git-review/hooks/example-pre-commit.php .git/hooks/pre-commit
```

Otherwise, if you don't use composer ...

```
$ git clone https://github.com/mcampbell508/git-review.git
$ cd git-review/
$ composer install --no-dev --optimize-autoloader
$ bin/git-review.php hook:install hooks/example-pre-commit.php ~/.../.git/hooks/pre-commit
```

### Global Installation and Usage

[](#global-installation-and-usage)

The hooks can also be used for any project if you install `git-review` globally:

```
$ composer g require mcampbell508/git-review
```

Then, just install the hooks as you would normally but reference the global installation path:

```
$ git-review.php hook:install ~/.composer/vendor/mcampbell508/git-review/hooks/git-review-commit-msg.php .git/hooks/commit-msg
```

This assumes you have set up [global composer paths](https://getcomposer.org/doc/03-cli.md#global).

Example Hooks
-------------

[](#example-hooks)

Static Review can be used for both files and commit message review. Below are basic hooks for each.

### For Files

[](#for-files)

```
#!/usr/bin/env php
