Day 3: Upgrade That Language!

Along with package upgrades, it’s crucial that developers have plans in place for upgrading the languages they use. This is the third principle: modern applications must have an upgrade plan for the underlying language(s) used.

 For PHP developers, this often means upgrading your PHP language when a new version comes out. This is not just a theoretical argument; PHP regularly takes old versions out of support around the time of new releases. To receive bug and security fixes, developers must upgrade to a newer version of PHP, often within three years of the last upgrade.

This can be incredibly painful for large or cumbersome applications, especially those without tests (which is why modern applications must have tests). I have had the opportunity to migrate tens of thousands of lines of PHP code from one version to another, and I can personally tell you the struggles and uncertainty that come with this process. This makes having a plan essential: without a plan, the migration never happens, and becomes that much harder in future versions.

Having tests significantly helps in this area, because tests can often tell you what is broken before you discover it yourself. But if your application lacks tests, and you have to do manual testing, expect the upgrade from one version of PHP to another to take 1/3rd of your time doing the upgrade, and 2/3rds manually testing the changes.

But whatever you do, make sure you upgrade. Being on a supported version of PHP is so much easier and better for your application, not to mention your security and performance.

Sunday, December 27th, 2020 @ 9:00 am | Comment (1) | Categories: PHP


Copyright © 2023 by Brandon Savage. All rights reserved.