Project

General

Profile

Actions

Feature #21381

open

Feature #21380: Hosting migration

Upgrade to PHP 8.1.x as part of Reclaim migration

Added by Boone Gorges 24 days ago. Updated 13 days ago.

Status:
New
Priority name:
Normal
Assignee:
Category name:
Server
Target version:
Start date:
2024-11-01
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

One takeaway from our initial meeting with Reclaim is that they cannot support our current version of PHP, which is 7.4.x. The minimum version their infrastructure can support is 8.1.x. This is not ideal; it would have been nice to move everything over without making this change at the same time. But it sounds like it won't be possible.

8.1.x is out of active support, but is in security support through 31 Dec 2025. https://www.php.net/supported-versions.php All things being equal, I'd like to upgrade to the lowest possible versions as part of this migration - fewer things to break. As such, my current thinking is that we aim for 8.1.x, and after the successful migration, immediately begin planning for an upgrade to the 8.3.x series. We can target this latter move for sometime during the first half of 2025.

I don't anticipate that a huge amount of work will be necessary for the upgrade. But we should do some brainstorming about what we can do in advance. Here are some rough initial thoughts:

1. Create a php-8.1 branch. Perhaps we will simply use Ray's branch from #18496
2. Update linting and PHPCS rules, along with GitHub Action config https://github.com/cuny-academic-commons/cac/blob/master/.github/workflows/lint-php.yml#L19, to run against PHP 8.1. Jeremy, I'll lean on you to do this, since you helped to set up the GitHub CI.
3. As soon as Reclaim is able, we get a test version of the Commons running in the production-environment-to-be. The team comes up with a list items to be tested manually in this new environment. This will include mission-critical parts of the Commons that are subject to breakage in new environments (email sending, media upload, object caching, etc). Then we delegate out the testing as needed to members of the team.
4. At some point - this could happen after the migration - we remove exceptions in our CI that are related to PHP 8-only code. See eg https://github.com/cuny-academic-commons/cac/blob/2.4.x/developer/lint-php/lint-php.sh. Similarly, we can upgrade plugins that are excluded from our upgrade scripts because of PHP compat. See eg https://github.com/cuny-academic-commons/wp-cli-cac/commit/8d76f4d426c0998d4707e02e3a1bf80c7453cc64

If anyone has ideas about other steps we can take to frontload or automate some of the testing, or to otherwise decrease the amount of stress and uncertainty related to this upgrade, I'd be happy to hear them :-D


Related issues

Related to CUNY Academic Commons - Bug #18496: PHP 8+ CompatibilityNew2023-07-21

Actions
Actions

Also available in: Atom PDF