Prepare Moodle for PHP 8.2
A) Verify the docs have been updated with the information about PHP 8.2 support., at very least:
- PHP 8.2 support: https://moodledev.io/general/development/policies/php
- Existing release notes in all the branches affected, see:
- (to be created) for 4.3: https://moodledev.io/general/releases/4.3#server-requirements (example issue)
B) Verify that both 402_STABLE and master (4.3dev) can be installed using PHP 8.2
C) Verify that a 402_STABLE site can be upgraded to master (4.3dev) using PHP 8.2
D) Check that all CI jobs are passing ok with PHP 8.2.A) Verify the docs have been updated with the information about PHP 8.2 support., at very least: PHP 8.2 support: https://moodledev.io/general/development/policies/php Existing release notes in all the branches affected, see: (to be created) for 4.3: https://moodledev.io/general/releases/4.3#server-requirements ( example issue ) B) Verify that both 402_STABLE and master (4.3dev) can be installed using PHP 8.2 C) Verify that a 402_STABLE site can be upgraded to master (4.3dev) using PHP 8.2 D) Check that all CI jobs are passing ok with PHP 8.2.
(image taken after completion, now php82 is being tested everywhere, GHA, CIs... so no need for those custom tests and branches anymore)
The, hopefully small, epic to turn Moodle ready for PHP 8.2.
When: Being cristal clear (aka transparent), the ideal target release for this is Moodle 4.2.0 (aka, supported since the very beginning of the branch), but be warned that full support may arrive later in any Moodle 4.2.x minor release in the branch, depending of a number of factors (extensions availability and bugs, 3rd part libraries, last minute surprises...).
Some initial links:
- Main changes explained: https://stitcher.io/blog/new-in-php-82 and https://php.watch/versions/8.2.
- Changes detailed: https://github.com/php/php-src/blob/PHP-8.2/UPGRADING.
- Accepted RFCs: https://wiki.php.net/rfc#php_82.
Some basic requirements for this:
- get unit and acceptance tests passing against all databases (may imply the need of upgrading phpunit/behat...).
- check that all the change details have been reviewed and fixed (attached file coming soon!). Note that, until release, this file is considered WIP and subject to changes! Reference: https://github.com/php/php-src/blob/PHP-8.2/UPGRADING (
- ensure older versions of Moodle don't work with PHP 8.2 (
- (link) - get moodle-php-apache docker images working with the new php version
- verify that php-parallel-lint/php-parallel-lint and others pass for all php versions (
- DONE - There are a few - search in the tracker for any issue created about "php 8.2" or "php82". Add them to this epic after analysing them.
- FINAL: Verify that the apache logs are clean of PHP 8.1 notices/warnings/errors (
- FINAL: Verify that all the issues found by the dev version of PHPCompatibility are fixed or false positives (
- (not done, we are doing it for all jobs together, see "nightlyjobs" in "TODO 1" below) - FINAL: When CIs are passing consistently, put all the MySQL (W) jobs in the target branches of the Epic to, manually, use the new PHP version (note that later, in the TODOs, we'll undo this manual configuration).
- FINAL: Get gha working with the new php version (
- FINAL: Verify that both install and upgrade from lowest possible site works ok, without any error/warning/notice. Both cli and web (
- FINAL: phpcs.xml.dist : Ensure that the testVersion config setting matches the range of PHP supported versions in all the affected branches. Note that for master branch we leave the range open always.
- (PR#734) - FINAL: Update docs (and others, see testing instructions) once this is ready. If needed to, ask for the creation of the next major release page in devdocs (example issue).
And some tasks to do once this is upstream:
TODO 1: Review the travis (only moodle-plugin-ci) and/or github actions configuration for various repositories. The new PHP version needs to be covered. Known to need review / fix repos include:
- PR#269 - moodle_docker
- (already supported) moodle-ci-runner
- MR#51 - nightlyjobs (don't forget to delete any manual configuration that has been done in advance for the, usually, MySQL (W) jobs in the Epic target branches).
- (already supported) moodle-cs
- PR#232 - moodle-plugin-ci
- PR#219 - local_codechecker
- PR#118 - local_moodlecheck
- local_ci - Not strictly required, but PR#276 created to achieve that.
- Issue#121 - moodle-tool_pluginskel
- PR#4 - moodle-webservice_xmlrpc
All the issues belonging to this epic should be pulled into master (4.3dev) and backported to 4.2.x (unless they are bug fixes requiring patching older, still supported, branches)