[wp-trac] [WordPress Trac] #50640: [PHPUnit] Mark test as skipped instead of failing if GD extension is not availble
WordPress Trac
noreply at wordpress.org
Wed Sep 16 03:04:13 UTC 2020
#50640: [PHPUnit] Mark test as skipped instead of failing if GD extension is not
availble
------------------------------+---------------------
Reporter: ayeshrajans | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.6
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch php8 | Focuses:
------------------------------+---------------------
Changes (by SergeyBiryukov):
* milestone: Awaiting Review => 5.6
Comment:
There is some overlap with #50639 here, moving to the milestone to address
one way or another.
Looking at the [https://travis-ci.com/github/WordPress/wordpress-
develop/jobs/385374984 current test failures], quite a few are caused by
[https://github.com/WordPress/wpdev-docker-
images/blob/84a4acfc15fd0bff04e3342e5c24a2c0ce5211cf/update.php#L181
missing 'gd' extension] in the [https://github.com/WordPress/wpdev-docker-
images WP Docker image]. That includes tests explicitly checking for
`imagejpeg()` and failing with "jpeg support unavailable", as well as
tests implicitly relying on GD availability without specifically checking
for it, causing more obscure failures.
The Docker image should probably be updated to provide the same list of
extensions for PHP 8 that we currently have for PHP 7.4 and older: `gd`,
`opcache`, `mysqli`, `zip`, `exif`, `intl`, `mbstring`, `xml`, `xsl`. If
anyone is able to help with that and open a PR, please do :)
Still, explicitly requiring `imagejpeg()` and related functions as
outlined in comment:3:ticket:50639 would be better than the current
obscure failures. So consistently requiring GD functions where needed
seems like the next step here. Where that means failing or skipping the
test, can be determined later.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50640#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list