phpmigrationphp-5.6php-7.2transpiler

PHP 5 to PHP 7 transpiler


I have a big project in php 5 and it's well documented. Now, I want to migrate to php 7.2 and I have already checked the compatibility using phpstan and every thing is alright. So, I wonder if there is a tool that could automatically transform the php 5 annotations to php 7 (like functions declarations and variables )?

Thanks in advance


Solution

  • Aside from php-cs-fixer, also have a look at Rector. It offers much more advanced rules and allows you to create your own.