PHPackages                             kerrialn/migrator - 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. [Database &amp; ORM](/categories/database)
4. /
5. kerrialn/migrator

ActiveLibrary[Database &amp; ORM](/categories/database)

kerrialn/migrator
=================

v1.3.9(2mo ago)750MITPHPPHP ^8.2

Since Mar 7Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/Kerrialn/migrator)[ Packagist](https://packagist.org/packages/kerrialn/migrator)[ RSS](/packages/kerrialn-migrator/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (14)Versions (40)Used By (0)

Migrator
========

[](#migrator)

**Migrator** is a global CLI tool that analyses the complexity of upgrading or migrating a PHP project. Run it against any codebase to get a scored report across framework coupling, database coupling, dependency compatibility, architecture quality, test coverage, and codebase size.

> **This is a global tool — do not install it as a project dependency.** It runs on your development machine and analyses projects by path.

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

[](#requirements)

- PHP 8.2+

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

[](#installation)

Install globally with Composer:

```
composer global require kerrialn/migrator
```

Then ensure the global Composer bin directory is in your `PATH`.

**Mac / Linux** — add to `~/.zshrc` or `~/.bashrc`:

```
export PATH="$HOME/.composer/vendor/bin:$PATH"
```

Reload your shell:

```
source ~/.zshrc
```

**Windows** — run in PowerShell (adds permanently for your user):

```
[System.Environment]::SetEnvironmentVariable(
    "PATH",
    $env:PATH + ";$env:APPDATA\Composer\vendor\bin",
    "User"
)
```

Then restart your terminal. Alternatively, add `%APPDATA%\Composer\vendor\bin` via **System Properties → Environment Variables**.

Usage
-----

[](#usage)

Navigate to the project you want to analyse and run:

```
cd /path/to/your/project
migrator analyse
```

The tool will prompt you for migration or upgrade mode, then source and target framework or PHP version.

On the first run, create a `migrator.php` config file in the project root. You can commit this file to persist your configuration.

Configuration
-------------

[](#configuration)

```
