3 ms·
We migrated the codebase of our most ancient system (started in 2008) to PHP8 this May. Millions of lines of code. It mostly consists of PHP5-era code, and ther
by kgeist 3y ago
We migrated the codebase of our most ancient system (started in 2008) to PHP8 this May. Millions of lines of code. It mostly consists of PHP5-era code, and there's also newer code which is compatible with PHP7. It took 4 weeks of work of 1 dev and 1 QA (including bugfixing). The engineer responsible for the conversion downloaded all existing linters he could find, ran them and fixed code until they stopped complaining. He also he used Rector - software which can semi-automatically update PHP code to newer versions. We had a few non-critical regressions after the release due to the breaking changes, but otherwise I was surprised how smooth the release was. My favorite feature is "constructor property promotion", a lot of classes now take 2 times less code.