Awesome PHP Migrations
Awesome list about PHP code bases migrations, legacy refactoring and instant upgrades. (This list is not about database migrations.)
Do you have an old PHP project that you need to migrate to newer version, different framework, templating system or config format? This is the place.
What to Contribute?
The goal of this post is to keep it short, useful and reliable. Work with legacy often very frustrating, as behind corner there is a new black hole of problems to suck us in.
Our mission is to keep this list practical and light so we can see the light in every legacy project :)
- Welcomed are: tools, posts, case-studies and short videos.
- Avoid conference videos, as they're long and without clickable resources.
- Avoid books, as they're opinionated, long, often outdated and hard to use. If you need to contribute last 2, try awesome-php.
Generic Tools
- rector/rector - Tool for Instant Upgrades and Instant Refactoring of any PHP 5.3+ code
Framework Migrations
Symfony Upgrade
Nette to Symfony
- How we Migrated from Nette to Symfony in 3 Weeks [case study]
Legacy framework to PSR-15
Legacy Unfreeze
- symplify/vendor-patches - PHP tool to effectively and temporarily patch your
/vendor
files
Static Removal
- symplify/static-detector - PHP tool that shows where do you have static method and where they're called from
- symplify/template-checker - PHP tool that extracts static calls from Latte templates to
FilterProvider
classes
Dev Tools
- How to Migrate From PHP CS Fixer to EasyCodingStandard in 6 Steps [post]
- How to Migrate From PHP_CodeSniffer to EasyCodingStandard in 7 Steps [post]
Config Migrations
- symplify/neon-to-yaml-converter - PHP tool that migrates NEON to YAML syntax
- symplify/config-transformer - PHP tool that migrates Symfony configs with YAML/XML syntax to PHP
Template Migrations
- symplify/latte-to-twig-converter - PHP tool that migrated LATTE templates to TWIG
Continuous Integration Checks
- symplify/template-checker - PHP tool, that checks
$this->render()
contains existing template files - symplify/class-presence - PHP tool that checks NEON/YAML/TWIG/LATTE files for existing classes and class constants
- Switch Travis to GitHub Actions to Reduce Stress [post]
File System Migrations
- symplify/psr4-switcher - PHP tool that helps you to migrate random classes to PSR-4