PHPackages                             elvanto/referee - 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. elvanto/referee

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

elvanto/referee
===============

A simple tool for refactoring legacy PHP code

0.0.1(9y ago)12841MITPHP

Since May 13Pushed 7y ago4 watchersCompare

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

READMEChangelog (1)Dependencies (4)Versions (4)Used By (0)

Referee
=======

[](#referee)

Referee is a simple tool for refactoring legacy PHP code, based on the strategies presented in Paul M. Jones' book [Modernizing Legacy Applications in PHP](https://leanpub.com/mlaphp).

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

[](#installation)

The preferred installation method is [composer](https://getcomposer.org);

```
composer require-dev elvanto/referee
```

Usage
-----

[](#usage)

A list of valid commands can be found by running `vendor/bin/referee list`. Before executing any of the commands, it is recommended that you are using a version control system with a clean working copy. This will ensure that any unwanted changes can be rolled back without affecting prior changes.

Using the `--dry-run` flag with any of the commands will result in changes being reported without any files being updated.

### Extracting static classes from function files

[](#extracting-static-classes-from-function-files)

The `extract-class` command takes the name of a file containing function definitions and generates a namespaced class with equivalent static methods. Any usages of the original functions in the `` directories will be replaced with appropriate static method calls on the newly generated class. All files are changed in place.

Further commands will be added in future.

License
-------

[](#license)

[MIT License](LICENSE)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

3640d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/77a936b5c659456479744d404f68ba7bca9552f1d008aa2cf3b8a9175c9ddfb4?d=identicon)[bensinclair](/maintainers/bensinclair)

![](https://www.gravatar.com/avatar/7cf1c2feb7af5eafbcec1d7258f9909e785bb27bda7ca57e47a2794241bf960c?d=identicon)[joshmcrae](/maintainers/joshmcrae)

---

Top Contributors

[![joshmcrae](https://avatars.githubusercontent.com/u/12324115?v=4)](https://github.com/joshmcrae "joshmcrae (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/elvanto-referee/health.svg)

```
[![Health](https://phpackages.com/badges/elvanto-referee/health.svg)](https://phpackages.com/packages/elvanto-referee)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[phpro/soap-client

A general purpose SoapClient library

8885.6M46](/packages/phpro-soap-client)[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4723.6M20](/packages/coenjacobs-mozart)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

96374.6k23](/packages/friendsoftypo3-content-blocks)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)

PHPackages © 2026

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