At present we have core's 7.x branch set up to run automated tests with the following configs:

PHP 5.3 & MySQL 5.5
PHP 5.4 & MySQL 5.5
PHP 5.5 & MySQL 5.5
PHP 5.6 & MySQL 5.5
PHP 7.1 & MySQL 5.5
PHP 7.2 & MySQL 5.5
PHP 7 & MySQL 5.5 issue testing default

We need to review and update this.

For new versions of PHP and MySQL:

According to https://www.drupal.org/docs/7/system-requirements/php-requirements :

The minimum recommended PHP version for Drupal 7 is PHP 7.1.x (until it's official end-of-life at 1 Dec, 2019).

So we should update the issue testing default to PHP 7.1, and probably change that again to PHP 7.2 after 7.1's EOL.

According to https://www.php.net/supported-versions.php all versions of PHP 5 are now EOL, and so is PHP 7.0. Do we need to keep any of these enabled in our automated testing? Probably yes in at least some cases. For reference, D8 still has PHP 5.5, 5.6 and 7.0 enabled.

For MySQL, https://www.drupal.org/docs/7/system-requirements/database-server seems quite out-of-date for Drupal 7 - it mentions:

Drupal 7 supports MySQL 5.0.15/MySQL 5.1.30/MariaDB 5.1.44/Percona Server 5.1.70 or higher

https://en.wikipedia.org/wiki/MySQL#Release_history suggests that MySQL 5.5 is now EOL.

What versions of MySQL 5.x should we be testing against? D8 still has 5.5 enabled, but different branches also have combinations of 5.6 and 5.7 enabled.

CommentFileSizeAuthor
#6 3092260-6.patch288 bytesmcdruid

Comments

mcdruid created an issue. See original summary.

mustanggb’s picture

I don't think so many are needed every time, of course we can always do custom runs if issues arise.

A quick Google returns: https://w3techs.com/technologies/details/pl-php/7/all
Which reports 7.2 has more usage than both 7.0 and 7.1, so perhaps a reasonable default?

I'd also think the min and max supported version should be included.

So for me the minimum would be:

PHP 5.3 & MySQL 5.5
PHP 7.2 & MySQL 5.5 issue testing default
PHP 7.3 & MySQL 5.5

From https://w3techs.com/technologies/details/pl-php/5/all 5.6 is still very popular, so maybe go with:

PHP 5.3 & MySQL 5.5
PHP 5.6 & MySQL 5.5
PHP 7.2 & MySQL 5.5 issue testing default
PHP 7.3 & MySQL 5.5
mcdruid’s picture

Yup, I think those lists are looking good.

We probably also need to keep 7.0 despite the fact it's EOL as - for example - Ubuntu 16.04 (Xenial) is likely to retain support for that until early 2024.

The previous LTS 14.04 (Trusty) in fact may keep PHP 5.5 going until early 2022 which may be one reason D8's still testing on that.

I had hoped we might be able to save some CI cycles and cut the list down a bit, but not sure we're going to be able to eliminate much. PHP 5.4 perhaps?

mcdruid’s picture

I'm not entirely sure what to think about MySQL versions.

AFAICS these are the defaults in debianland:

ubuntu bionic (EOL 2028): 5.7
ubuntu xenial (EOL 2024): 5.7
ubuntu trusty (EOL 2022): 5.5
debian buster (EOL ~2022): 5.7 or 8.0
debian stretch (EOL ~2020): 5.5
mcdruid’s picture

As #3025335: session_id() cannot be changed after session is started has been committed, the 7.x branch now passes tests with PHP 7.3, so that's been added to the automated testing config.

I think the next changes to make might be to remove PHP 5.4 and to switch the default from PHP 7(.0) to PHP 7.1 - it won't be long before we'll probably change that to PHP 7.2 as default, but let's keep the changes gradual and incremental.

mcdruid’s picture

Status: Active » Needs review
StatusFileSize
new288 bytes

I've switched the default to PHP 7.1 (for now - this'll probably be short-lived though and we'll up that to PHP 7.2) and removed PHP 5.4.

Uploading a "no-op" patch here so that we can try out different testing combinations.

I'd like to add at least one test with MySQL 5.7 whereas at the moment everything's MySQL 5.5.

Setting to NR to trigger tests.

mcdruid’s picture

Added MySQL 5.6 and 5.7 with the current default PHP version of 7.1; I think when we update the default to PHP 7.2 we should change these too.

mcdruid’s picture

Updated the default to be PHP 7.2 with MySQL 5.5

I also changed the MySQL 5.6 and 5.7 tests from PHP 7.1 to PHP 7.2

We'll generally aim to do this as PHP versions are retired.

mcdruid’s picture

Assigned: Unassigned » mcdruid

The config is currently:

PHP 5.3 & MySQL 5.5
PHP 5.6 & MySQL 5.5
PHP 7.2 & MySQL 5.6 <= default
PHP 7.2 & MySQL 5.7
PHP 7.2 & MySQL 8
PHP 7.2 & SQLite 3.28
PHP 7.3 & MySQL 5.6
PHP 7.4 & MySQL 5.6

I think we should update the default to PHP 7.2 and MySQL 5.7 as MySQL 5.6 is now past EoL. Also PHP 7.3 and 7.4 should be updated to test with MySQL 5.7

In fact PHP 7.2 is also EoL but some distros - including ubuntu 18.04 - will support it for a few more years.

Any other suggested changes?

mustanggb’s picture

I wouldn't worry about Ubuntu 18.04, we didn't worry about Ubuntu 16.04 shipping with PHP 7.0 when we changed to PHP 7.2 last time and it still had 1.5 years left of support.

So I think at least bump up past the EOL's; PHP 7.3 and MySQL 5.7

Although personally I'd rather just go to; PHP 7.4 and MySQL 8.0

mcdruid’s picture

Thanks for the feedback.

I've set it up like this for now:

PHP 5.3 & MySQL 5.5
PHP 5.6 & MySQL 5.5
PHP 7.2 & MySQL 5.6
PHP 7.3 & MySQL 5.7 <= default
PHP 7.3 & MySQL 8
PHP 7.3 & SQLite 3.28
PHP 7.4 & MySQL 5.7

We'll add PHP 8 when we have core passing tests, and make PHP 7.4 the default in due course when PHP 7.3 goes EoL.

mfb’s picture

Could we add PHP 8.1 as "tested on commit"?

poker10’s picture

PostgreSQL 13 and 14 were added to the PHP 8.1 containers (see: #3240346: Add Postgresql 15.4/16.0 to CI). I propose to add one new automated test configuration for D7:

  • PHP 8.1 & pgsql-14.1

In the PostgreSQL we are only testing against the version 9.5, which is pretty old and was EOL in February 2021. Anyway, I think we should keep this PostgreSQL version here (for backwards compatibility testing) and only add one new configuration mentioned above.

If we want to remove something, maybe PHP 7.3 & MySQL 5.7 will be a good candidate, asi this PHP is EOL and we are also testing PHP 7.2 (because of the MySQL 5.6 version) and PHP 7.4.

So this would be the current list:

PHP 5.3 & MySQL 5.5
PHP 5.6 & MySQL 5.5
PHP 7.2 & MySQL 5.6
PHP 7.3 & MySQL 5.7 (potential candidate to remove?)
PHP 7.4 & MySQL 5.7 <= default
PHP 7.4 & MySQL 8
PHP 7.4 & PostgreSQL 9.5
PHP 7.4 & SQLite 3.27
PHP 8.0 & MySQL 5.7
PHP 8.1 & MySQL 5.7
PHP 8.1 & pgsql-14.1 (proposed new option)
poker10’s picture

Seems like I was too fast :) Those PostgreSQL 13 & 14 containers are currently not working on D7 testing (only D9/10). Hopefully it will be fixed soon, as it can prevent things like this: #3283311: D7 Backport: Drupal 8.x on Postgresql 12

poker10’s picture

So PHP 8.2 is officially out. And containers for PostgreSQL 13 and 14 were added. It seems like there are still some problems with the PostgreSQL 14 container on D7 (SQLSTATE[08006] [7] SCRAM authentication requires libpq version 10 or above), but that seems to be DrupalCI related.

According to the #13 I have revided my proposal:

PHP 5.3 & MySQL 5.5
PHP 5.6 & MySQL 5.5
PHP 7.2 & MySQL 5.6
PHP 7.3 & MySQL 5.7 (potential candidate to remove)
PHP 7.4 & MySQL 5.7
PHP 7.4 & MySQL 8 (potential candidate to remove)
PHP 7.4 & PostgreSQL 9.5
PHP 7.4 & SQLite 3.27
PHP 8.0 & MySQL 5.7
PHP 8.1 & MySQL 5.7 <= default
PHP 8.2 & MySQL 8 (proposed new option)
PHP 8.2 & pgsql-13.5 (proposed new option)

I think that we could remove the PHP 7.3 & MySQL 5.7 as we are testing the PHP 7.2 and also 7.4 and also the MySQL 5.7. And also the PHP 7.4 & MySQL 8 could be replaced with the PHP 8.2 & MySQL 8 (so we keep the MySQL 8 and in PHP 7.4 we have lot of others still left). The idea of the new PHP 8.2 & pgsql-13.5 combination was described in #13. I am also proposing to change the default testing version to PHP 8.1 & MySQL 5.7.

So this could be the final updated list (the number of tests is left unchanged = 10):

PHP 5.3 & MySQL 5.5
PHP 5.6 & MySQL 5.5
PHP 7.2 & MySQL 5.6
PHP 7.4 & MySQL 5.7
PHP 7.4 & PostgreSQL 9.5
PHP 7.4 & SQLite 3.27
PHP 8.0 & MySQL 5.7
PHP 8.1 & MySQL 5.7 <= default
PHP 8.2 & MySQL 8
PHP 8.2 & pgsql-13.5

What do you think?

joseph.olstad’s picture

looks good @poker10, except I would put PHP 8.2 as the default.

PHP 5.3 & MySQL 5.5
PHP 5.6 & MySQL 5.5
PHP 7.2 & MySQL 5.6
PHP 7.4 & MySQL 5.7
PHP 7.4 & PostgreSQL 9.5
PHP 7.4 & SQLite 3.27
PHP 8.0 & MySQL 5.7
PHP 8.1 & MySQL 5.7
PHP 8.2 & MySQL 8 <= default
PHP 8.2 & pgsql-13.5
mcdruid’s picture

I like the proposed changes.

I'm not certain about having PHP 8.2 / MySQL 8 as the default though...

It shouldn't really matter what the default is as patches should pass all of the tests before they're committed, but I think I'd prefer more incremental changes so would vote for the final list in #15.

joseph.olstad’s picture

cool ya, #15 is great thanks, looking forward to seeing PHP 8.2 listed in there, even if it's not "the default"

poker10’s picture

Thanks! I have updated the automated test configuration according to the #15.

joseph.olstad’s picture

Status: Needs review » Fixed

Thanks @mcdruid and @poker10

poker10’s picture

Updating issue credits in case this stays Fixed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.