Prepare Moodle for PHP 8.0
A) Verify the docs have been updated with the information about PHP 8.0 support., at very least:
- PHP 8.x support: https://moodledev.io/general/development/policies/php
- Release notes in all the branches affected, see:
B) Verify that 311_STABLE and master can be installed using PHP 8.0
C) Verify that a 36_STABLE site can be upgraded to 311_STABLE and master using PHP 8.0
D) Check that all CI jobs are passing ok with PHP 8.0.A) Verify the docs have been updated with the information about PHP 8.0 support., at very least: PHP 8.x support: https://moodledev.io/general/development/policies/php Release notes in all the branches affected, see: for 3.11: https://moodledev.io/general/releases/3.11#server-requirements for 4.0: https://moodledev.io/general/releases/4.0#server-requirements B) Verify that 311_STABLE and master can be installed using PHP 8.0 C) Verify that a 36_STABLE site can be upgraded to 311_STABLE and master using PHP 8.0 D) Check that all CI jobs are passing ok with PHP 8.0.
(image taken before closing, now php80 is being tested everywhere, GHA, CI... so no need for those custom tests and branches anymore)
Accumulative branches (with all the pending stuff still not upstream) are:
- master: https://github.com/stronk7/moodle/compare/master...php80 (deleted)
- 311_STABLE: https://github.com/stronk7/moodle/compare/MOODLE_311_STABLE...php80_311 (deleted)
An, hopefully, small epic to turn Moodle ready for PHP 8.0.
When: Being cristal clear (aka transparent), the ideal target release for this is Moodle 3.11.0 (aka, supported since the very beginning of the branch), but be warned that full support may arrive later in any Moodle 3.11.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-8 and https://php.watch/versions/8.0.
- Changes detailed: https://github.com/php/php-src/blob/PHP-8.0/UPGRADING.
- Accepted RFCs: https://wiki.php.net/rfc#php_80.
Some basic requirements for this:
- get unit and acceptance tests passing against all databases (may imply the need of upgrading phpunit/behat...).
- check all the changes details have been reviewed and fixed (attached file).
- ensure older versions of Moodle don't work with PHP 8.0 (
- get travis and gha working with the new php version (
- verify that there apache logs are clean of PHP 8.0 notices/warnings/errors (
- get moodle-php-apache docker images working with the new php version
- verify that php-parallel-lint/php-parallel-lint passes for all php versions (
- Update docs (and others, see testing instructions) once this is ready.
And some tasks to do once this is upstream:
TODO 1: Review the travis and/or github actions configuration for various repositories. The new PHP version needs to be covered. Known to need review / fix repos include:
- moodle_docker (PR#158)
- nightlyjobs (MR!31)
- moodle-plugin-ci (PR#94)
- local_codechecker (PR#145)
- local_moodlecheck (PR#74)
- moodle-tool_pluginskel (PR#109)
TODO 2: Verify that this PR has been fixed/hopefully released @ MinkExtension (new PHP 8 warning) and update our dependencies to it.
All the issues belonging to this epic should be pulled into both MOODLE_311_STABLE and master (unless they are bug fixes requiring patching older, still supported, branches)