4 ms·
PHP 8 is the best version of PHP yet, and the main reason why it's so good is precisely because it got rid of a huge amount of ugly, legacy behavior. Upgrading
by danogentili 3y ago
PHP 8 is the best version of PHP yet, and the main reason why it's so good is precisely because it got rid of a huge amount of ugly, legacy behavior.
Upgrading a codebase to PHP 8 is not an insurmountable task, I've upgraded our 1 million SLOC codebase at work in just a few weeks, with the help of tools like https://psalm.dev https://psalm.dev and our own strict coding standard.
- user3939382 3y ago> with the help of tools like Rector, which can automate these changes.
- danogentili 3y agoYeah I'm aware of Rector, there's a funny story here, I actually created https://github.com/phabelio/phabel https://github.com/phabelio/phabel which does the same thing as Rector, but @ installation time (fully integrated with Composer!): I created because I simply did not know about its existence, or else I would've just used it, instead :) Rector is a very nice project, but I still haven't gotten around to integrating it into our codebase at work, because it uses phpstan instead of Psalm, and apart from being slower than Psalm, phpstan kept having various issues and crashes while scanning our codebase, unlike Psalm which mostly worked out of the box (I even became maintainer of Psalm, due to the large amount of additional performance improvements I added due to our needs @ work). At work, we're currently using Psalm with a few extensions that make some autofixes as needed, a bit like Rector.