Avoid forcing Imagick-only editor when Imagick lacks core format support#2522
Avoid forcing Imagick-only editor when Imagick lacks core format support#2522Copilot wants to merge 3 commits into
Conversation
Co-authored-by: westonruter <134745+westonruter@users.noreply.github.com>
Co-authored-by: westonruter <134745+westonruter@users.noreply.github.com>
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @Copilot. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #2522 +/- ##
=======================================
Coverage 69.29% 69.29%
=======================================
Files 90 90
Lines 7723 7723
=======================================
Hits 5352 5352
Misses 2371 2371
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@westonruter this is related to an issue I faced while testing the transparent AVIF issue with the Imagick editor #2245 (comment). We use the |
|
Ah that PR got merged I will update the #2245 and see if there is still issue of unsupported formats. |
|
@westonruter Okay, I tested this and confirmed that the For - "test-php:webp-uploads": "wp-env --config=.wp-env.test.json run cli --env-cwd=/var/www/html/wp-content/plugins/performance composer test:webp-uploads",
+ "test-php:webp-uploads": "wp-env --config=.wp-env.test.json run wordpress --env-cwd=/var/www/html/wp-content/plugins/performance composer test:webp-uploads",I also tested Given the difference in test coverage, I think we should use the |
|
@b1ink0 ok, great! Could you open a PR to test that? |
Fixes #2521
dominant-color-imagestests were skipping many MIME-type cases inwp-envbecause the Imagick test setup always forcedWP_Image_Editor_Imagick, even in environments where Imagick is loaded but reports no usable image formats. This created broad, noisy skips unrelated to the code under test.Test_Dominant_Color_Image_Editor_Imagick::set_up(), the Imagick-only editor filter is now applied only when Imagick supports all required formats (JPEG,PNG,GIF,WEBP).Imagick::queryFormats()is wrapped intry/catch; if querying fails, the test is skipped with a clear reason instead of failing setup unexpectedly.