Problem/Motivation

After #3484966: Allow executing unit tests on multiple PHP images without having to duplicate unit tests across all environment combinations and #3512443: Add a PHP 8.5 image for early testing we can now get Unit tests run under PHP 8.5, allowing failures.

This way we can spot deprecations and/or behavior changes well in advance of PHP 8.5 release.

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3512558

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

mondrake created an issue. See original summary.

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

andypost’s picture

Fixed image tag to `dev`

andypost’s picture

I think we can reuse the issue to add daily test with 8.5

andypost’s picture

Build tests fail for reason as Prophecy is strict in composer for supported versions

andypost’s picture

but kernel test repeatedly fail

---- Drupal\KernelTests\Core\Image\ToolkitGdTest ----
Status    Group      Filename          Line Function                            
--------------------------------------------------------------------------------
Fail      Other      phpunit-9.xml        0 Drupal\KernelTests\Core\Image\Toolk
    PHPUnit Test failed to complete; Error: PHPUnit 10.5.38 by Sebastian Bergmann and contributors.
    
    Runtime:       PHP 8.5.0-dev
    Configuration: /builds/issue/drupal-3512558/core/phpunit.xml.dist
    
    ............FF...............FF...............FF...............  63 / 120 ( 52%)
    FF...............FF...............FF.....................       120 / 120 (100%)
    
    Time: 01:44.995, Memory: 10.00 MB
    
    Toolkit Gd (Drupal\KernelTests\Core\Image\ToolkitGd)
     ✔ Manipulations with 0
     ✔ Manipulations with 1
     ✔ Manipulations with 2
     ✔ Manipulations with 3
     ✔ Manipulations with 4
     ✔ Manipulations with 5
     ✔ Manipulations with 6
     ✔ Manipulations with 7
     ✔ Manipulations with 8
     ✔ Manipulations with 9
     ✔ Manipulations with 10
     ✔ Manipulations with 11
     ✘ Manipulations with 12
       ┐
       ├ Image 'image-test.png' object after 'rotate_5' action has the correct color placement at corner '0' - Actual: {255,0,93,0}, Expected: {255,0,255,0}, Distance: 26244, Tolerance: 0
       ├ Failed asserting that 26244 is equal to 0 or is less than 0.                                                                                                                      
       │
       │ /builds/issue/drupal-3512558/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php:90
       │ /builds/issue/drupal-3512558/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php:357
       ┴
     ✘ Manipulations with 13
       ┐
       ├ Image 'image-test.png' object after 'rotate_transparent_5' action has the correct color placement at corner '0' - Actual: {255,93,93,46}, Expected: {255,255,255,127}, Distance: 59049, Tolerance: 0
       ├ Failed asserting that 59049 is equal to 0 or is less than 0.                                                                                                                                        
       │
       │ /builds/issue/drupal-3512558/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php:90
       │ /builds/issue/drupal-3512558/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php:357
       ┴
     ✔ Manipulations with 14
     ✔ Manipulations with 15
mondrake’s picture

IMHO we should not change the PHP default in this issue. Only use PHP 8.5 to run unit tests (no kernel, no build, no functional)

mondrake’s picture

Status: Active » Needs review

I suggest to address GD failures of the GDToolkit elsewhere.

mondrake’s picture

ftr, #3497431: Deprecate TestDiscovery test file scanning, use PHPUnit API instead would add printout by run-tests.sh of the PHP version in use, which now is missing. ATM we would only be able to see it if a test fails and the full PHPUnit test class report is output.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems pretty straight forward lets do it.

personal question how would contrib opt into 8.5?

Also as someone mentioned in slack thank you for keeping up with these.

mondrake’s picture

#11 well that's a new image thanks to @andypost, following the scheme of the Docker images in use by Drupal - so theoretically it should be available to contrib too. But not my piece of cake, maybe some fine guys from the infra team can comment.

andypost’s picture

I bet contrib testing needs some changes in templates but surely doable

andypost’s picture

  • catch committed 79888f7d on 11.x
    Issue #3512558 by andypost, mondrake: [CI] Run Unit tests on PHP 8.5...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

We should add PHP 8.5 testing to Drupal 10.5.x too, but I think we can do that with a full pipeline once 11.x is green on a beta or similar. A lot of changes in the pipeline yaml between 10.x and 11.x these days so backporting this will be tricky.

andypost’s picture

as of core 11.2 expected in June but first alpha of PHP 8.5 in July the only thing to change is CORE_PHP_NEXT after it #3513062-2: Allow opt-in PHP 8.5 testing

PS: usually in PHP lots of deprecations are commited in late beta cycle(

Status: Fixed » Closed (fixed)

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