PHPackages                             sjparkinson/static-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. sjparkinson/static-review

Abandoned → [phpro/grumphp](/?search=phpro%2Fgrumphp)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

sjparkinson/static-review
=========================

An extendable framework for version control hooks.

5.2.2(8y ago)3183.2M↑89.5%2820MITPHPPHP ^5.5 || ^7.0

Since Jul 20Pushed 8y ago14 watchersCompare

[ Source](https://github.com/sjparkinson/static-review)[ Packagist](https://packagist.org/packages/sjparkinson/static-review)[ RSS](/packages/sjparkinson-static-review/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (23)Used By (20)

static-review
=============

[](#static-review)

**This package is abandoned 🚨.**

See [GrumPHP](https://github.com/phpro/grumphp) for a maintained alternative.

---

An extendable framework for version control hooks.

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

Usage
-----

[](#usage)

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

```
$ composer require sjparkinson/static-review
```

Hooks can then be installed like so ...

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

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

```
$ git clone https://github.com/sjparkinson/static-review.git
$ cd static-review/
$ composer install --no-dev --optimize-autoloader
$ bin/static-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 `static-review` globally:

```
$ composer g require sjparkinson/static-review
```

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

```
$ static-review.php hook:install ~/.composer/vendor/sjparkinson/static-review/hooks/static-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
