Problem/Motivation

PHP 8.4 has been out for nearly half a year now, so I think we could switch the default test environment to use it.

Steps to reproduce

https://packagist.org/php-statistics

Proposed resolution

Switch default pipeline to PHP 8.4 and MySQL to 8.4 LTS as 8.0 is outdated https://dev.mysql.com/doc/refman/8.4/en/mysql-releases.html

Remaining tasks

agree and commit

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3515706

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

catch created an issue. See original summary.

danrod’s picture

Isn't it a bit too early for that? Still a lot of contrib modules still don't work well on PHP 8.3

solomon.yifru made their first commit to this issue’s fork.

catch’s picture

@danrod this is for core tests pipelines, we test on both PHP 8.4 and 8.3 every day, it has zero effect on contrib module test pipelines which are in the separate 'gitlab_templates' project.

mondrake’s picture

I wonder would it make sense to switch to PHPUnit 11 for 8.4 too? And let 8.3 and below onto PHPUnit 10? https://stitcher.io/blog/php-version-stats-january-2025

andypost made their first commit to this issue’s fork.

andypost’s picture

Status: Active » Needs review
Related issues: +#3400984: Make PHP 8.3 the default environment for gitlab CI runs

In start of July first alpha of PHP 8.5 will arrive so no reason to wait

andypost’s picture

Issue summary: View changes
andypost’s picture

Issue summary: View changes

Added commit to switch MySQL to 8.4 (LTS) for the default pipeline

Ref https://dev.mysql.com/doc/refman/8.4/en/mysql-releases.html

Note: MySQL 8.0 is a Bugfix series that preceded the LTS release model.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

lets do it!

andypost’s picture

8.0.34+ will transition to only bug fixes until 8.0 End-Of-Life (EOL) scheduled for April-2026

So nightly testing is good enough for support https://dev.mysql.com/blog-archive/introducing-mysql-innovation-and-long...

andypost’s picture

Title: Switch the default test environment to PHP 8.4 » Switch the default test environment to PHP 8.4 and MySQL 8.4
Issue summary: View changes

clearer title

  • catch committed 7034691e on 11.x
    Issue #3515706 by andypost, catch: Switch the default test environment...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

andypost’s picture

andypost’s picture

@catch thank you, curious how perf tests are executed (I have no access to start'em) and how it vary from 8.3 at the end

  • catch committed ac7afe45 on 11.x
    Revert "Issue #3515706 by andypost, catch: Switch the default test...
catch’s picture

Status: Fixed » Needs work

This caused a new, frequent, random test failure, it looks like it might be an issue with the images maybe. #3521851: [random test failure] Drupal\FunctionalTests\Bootstrap\UncaughtExceptionTest::testLostDatabaseConnection.

Reverted here for now, let's re-commit with that fixed one way or the other.

mondrake’s picture

FTR, weirdly, the revert also fixed the build tests failure lately in #3418267: Support PHPUnit 11 in Drupal 11. Ideally, it would preferable to postpone this one on that if there is interest to get PHPUnit 11 in Drupal 11.2 so that we do not have to play catch there.

andypost’s picture

Status: Needs work » Needs review
Related issues: +#3521926: Fix deprecated MySQL native passwords
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

I see the linked issue has been merged to "production" and "dev" so assuming that's what we use. So would this be good to go again

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

mondrake’s picture

Since bumping the default to 8.4 also forces the PHPUnit 11 bump for the PHPStan job, we now have a few more PHPUnit 11 errors that we should add to baseline.

mondrake’s picture

I do not understand why despite adding the baseline update, PHPStan still fails.

andypost’s picture

Maybe bump PHPstan in separate issue?

mondrake’s picture

Status: Needs work » Needs review

Tried #28.

mondrake’s picture

Status: Needs review » Needs work

Keeping PHPStan job on PHP 8.3 let the job pass, but the Build tests failure seems legitimate.

mondrake’s picture

mondrake’s picture

Title: Switch the default test environment to PHP 8.4 and MySQL 8.4 » [CI] Switch the default test environment to PHP 8.4 and MySQL 8.4
mondrake’s picture

mondrake’s picture

Status: Needs work » Needs review

The Build test failure had the same root cause of #3525031: [CI] Run PHPStan job on PHP 8.4.

composer run-script drupal-phpunit-upgrade-check, run during the PHPCS lint job, flashes a new composer.lock file as well as the packages metadata json files. But only the /vendor folder is stored as an artifact, not the updated files.

The MR now is built on top of the one in #3525031: [CI] Run PHPStan job on PHP 8.4; it is extended by including also the updated files in the PHPCS artifacts.

The downside: now the composer build artifacts as built by PHP 8.4 are also used by the PHP 8.3 tests of the child pipelines.

mondrake’s picture

Unfortunately the needs:job entry does not accept variables.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

leaning on pipeline passing for this one.

mondrake’s picture

Status: Reviewed & tested by the community » Postponed

Sorry, better wait for #3497431: Deprecate TestDiscovery test file scanning, use PHPUnit API instead that is now partially overlapping here too.

mondrake’s picture

Assigned: Unassigned » mondrake
Status: Postponed » Needs work

Tweaking this.

mondrake’s picture

Assigned: mondrake » Unassigned
Status: Needs work » Needs review

This could use a good look by @andypost if the php/db combinations are now accurate - a lot of changes and rebases of late here.

mondrake’s picture

andypost’s picture

Thank you looks good but something still fails

RTBCed #40 as it will help to debug real combination of php+db containers as I see something is not propagated from defaults

larowlan’s picture

mondrake’s picture

Issue tags: +PHPUnit 11
smustgrave’s picture

Seems to have a number of failures in package_manager but don't know if related.

mondrake’s picture

(not so) random recurring test failures

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

mondrake’s picture

Status: Needs work » Needs review
andypost’s picture

Status: Needs review » Reviewed & tested by the community

no more failures, except random

  • catch committed 77b9f19a on 11.x
    Issue #3515706 by mondrake, andypost, solomon.yifru, catch: [CI] Switch...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

Status: Fixed » Closed (fixed)

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