What does HackerNews think of rector?

Instant Upgrades and Automated Refactoring of any PHP 5.3+ code

Language: PHP

#10 in PHP
As someone maintaining multiple 10+ year old PHP applications - after the migration to 7 things have been super easy/simple. Especially if you get Rector [0] involved.

[0] https://github.com/rectorphp/rector

Also, see this: https://github.com/rectorphp/rector

Instant Upgrades and Automated Refactoring of any PHP 5.3+ code

There is no reason to be stuck on a previous version of Laravel.

With the help of rector, it should be an afternoon's work to upgrade.

https://github.com/rectorphp/rector

Getting a copy of PHPStorm will make things much easier, you can run Reformat code on PHP files and you can also do mass updates from code inspections.

Also worth checking out is a package called Rector (https://github.com/rectorphp/rector) which will automate a lot of this by scanning the codebase and providing diffs so you can upgrade safely.

Roughly in the order you should do it. Hopefully it's at least PHP 5.3 code:

1. Definitely get a PHP IDE: https://www.jetbrains.com/phpstorm/

2. Get a step debugger and hook it in: https://xdebug.org/

3. Fix the code style: https://github.com/FriendsOfPHP/PHP-CS-Fixer

4. Run the code through some static analysis tools https://phpstan.org/ https://psalm.dev/

5. Upgrade the code with an AST fixer (might help you update to newer PHP version): https://github.com/rectorphp/rector

6. Add tests to it: https://phpunit.de/

7. Run mutation tests: https://infection.github.io/

The "0 budget" is rough, though.