Skip to content

Conversation

@siliconforks
Copy link

Trac ticket: https://core.trac.wordpress.org/ticket/63932


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions
Copy link

github-actions bot commented Sep 7, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props siliconforks, desrosj.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

github-actions bot commented Sep 7, 2025

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Copy link
Member

@desrosj desrosj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I prefer the approach used in #9749 since it makes use of an official annotation in PHPUnit . @johnbillion what do you think?

@siliconforks
Copy link
Author

I think I prefer the approach used in #9749 since it makes use of an official annotation in PHPUnit .

The problem with PR #9749 is that it will skip the tests test_resizes_are_small_for_16bit_images and test_png_color_type_is_preserved_after_resize on a system with PHP 8.3 or 8.4 and ImageMagick 6. But there's no need for this - the tests pass on that system. (I've tested this on Ubuntu 24.04 LTS, which has PHP 8.3 and ImageMagick 6.)

I would guess that the reverse problem can happen too (although I have not tested this) - you could have a system with PHP 8.2 (or an earlier version) and ImageMagick 7, and then the tests would fail.

@desrosj
Copy link
Member

desrosj commented Sep 11, 2025

The problem with #9749 is that it will skip the tests test_resizes_are_small_for_16bit_images and test_png_color_type_is_preserved_after_resize on a system with PHP 8.3 or 8.4 and ImageMagick 6. But there's no need for this - the tests pass on that system. (I've tested this on Ubuntu 24.04 LTS, which has PHP 8.3 and ImageMagick 6.)

I know it's good to test as many combinations as possible, but are there actually any documented differences between how ImageMagick 6.x works on PHP 7.2-8.0 that would be inconsistent with PHP >= 8.1?

I would guess that the reverse problem can happen too (although I have not tested this) - you could have a system with PHP 8.2 (or an earlier version) and ImageMagick 7, and then the tests would fail.

The commit that changed the underlying base image for the official PHP images was made to PHP 8.1-8.5. The 8.1 & 8.2 containers have not yet been rebuilt and published because that only happens when an update is released for that version of PHP. 8.1 & 8.2 are currently only receiving security updates, so it's not known when (or if) a new build will be published. But when that does happen, the base image will then be the same as the 8.3 & 8.4 ones currently with ImageMagick 7.

@siliconforks
Copy link
Author

I know it's good to test as many combinations as possible, but are there actually any documented differences between how ImageMagick 6.x works on PHP 7.2-8.0 that would be inconsistent with PHP >= 8.1?

Probably not.

The commit that changed the underlying base image for the official PHP images was made to PHP 8.1-8.5. The 8.1 & 8.2 containers have not yet been rebuilt and published because that only happens when an update is released for that version of PHP. 8.1 & 8.2 are currently only receiving security updates, so it's not known when (or if) a new build will be published. But when that does happen, the base image will then be the same as the 8.3 & 8.4 ones currently with ImageMagick 7.

That's basically the sort of situation my PR is intended to address. If you have a system with PHP 8.1 or 8.2 and ImageMagick 6, but you later update ImageMagick to version 7, the code will detect that (because it just checks the ImageMagick version) and skip the problematic tests.

@johnbillion
Copy link
Member

I've merged this into #9749, thanks. Happy to use an exclusion which is more targeted, and hopefully it won't be in place for long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants