PHPackages                             ytsoni/php-migrater - 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. ytsoni/php-migrater

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

ytsoni/php-migrater
===================

PHP Legacy Migration Orchestrator — analyze, test, and fix PHP 5.x–8.x codebases for modern PHP versions

v1.0.0(3mo ago)06GPL-3.0-or-laterPHP &gt;=8.1

Since Apr 17Compare

[ Source](https://github.com/ytsoni/php-migrater)[ Packagist](https://packagist.org/packages/ytsoni/php-migrater)[ RSS](/packages/ytsoni-php-migrater/feed)WikiDiscussions Synced 3w ago

READMEChangelogDependencies (7)Versions (2)Used By (0)

PHP Migrater
============

[](#php-migrater)

A comprehensive PHP migration toolkit that analyzes, tests, and upgrades legacy PHP codebases (5.x → 8.x). Orchestrates custom AST-based analysis, PHPCompatibility, and Rector into a single workflow with interactive diff review, risk scoring, and incremental migration support.

Features
--------

[](#features)

- **AST-based analysis** — Detects loose comparisons, curly brace access, dynamic properties, implicit nullable types, nested ternaries, string-to-number coercions, and resource-to-object changes
- **Version detection** — Identifies PHP features used and maps to minimum required versions
- **PHPCompatibility integration** — Wraps `phpcs` with PHPCompatibility standard for broad compatibility scanning
- **Dependency analysis** — Checks `composer.lock` for packages with PHP version constraints
- **Risk scoring** — Ranks files by issue severity × code complexity for prioritized migration
- **7 built-in fixers** — Automated AST and regex-based fixes for common migration issues
- **Rector integration** — Optional orchestration of Rector upgrade rule sets
- **Interactive migration** — File-by-file diff review with apply/skip/quit, terminal or browser rendering
- **Resume support** — State file tracks progress; resume interrupted migrations
- **Test generation** — Characterization and behavioral test scaffolding before migration
- **Reporting** — Console, JSON, and HTML reports with severity/category breakdowns
- **Parallel analysis** — Worker pool for large codebases via `symfony/process`
- **Web dashboard** — Browser-based GUI for analysis and monitoring
- **Plugin architecture** — Extend with custom analyzers, fixers, test generators, and reporters

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

[](#requirements)

- PHP 8.1+
- Composer

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

[](#installation)

```
composer require ytsoni/php-migrater --dev
```

Quick Start
-----------

[](#quick-start)

### 1. Create a configuration file

[](#1-create-a-configuration-file)

```
cp vendor/ytsoni/php-migrater/php-migrater.php.dist php-migrater.php
```

Edit `php-migrater.php`:

```
