Repository navigation
Conversation
…iable in run command
It looks like this is because there's no 8.2 version of the WordPress image on docker hub - https://hub.docker.com/_/wordpress |
| - name: Install WordPress | ||
| run: | | ||
| npm run wp-env start | ||
|
|
There was a problem hiding this comment.
npm run test:unit:php already calls npm run wp-env start, so this is duplication.
There was a problem hiding this comment.
Oh, but lint:php which runs after this doesn't call npm run wp-env start. I've pushed a commit so that it does.
I personally think it might be better to go the other way and avoid npm run wp-env start as a prerequisite for these jobs.
|
Size Change: +36 B (0%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
|
The tests definitely run on PHP 8.1 now as expected, as there are some additional errors coming through: However the job for PHP 7.2 ends up being canceled: Not sure why 🤔 |
Well, the official Docker image from WP itself does have PHP 8.2 available: https://github.com/WordPress/wpdev-docker-images / https://hub.docker.com/u/wordpressdevelop |
|
Closing in favor of #46510 |
What?
See #43333
wp-env supports specifying the PHP version as an environment variable, so I'm hoping this is all that's required to run PHP unit tests against multiple PHP versions.
Why?
It'll help catch issues like this one - PHP 8.2 | Gutenberg is introducing deprecated callables into WP Core.
One problem is that wp-env doesn't seem to support PHP 8.2, when I tried it from the command line it errors:
How?
Use a matrix for the 'unit-php' job. At the moment I've started with 7.2 and 8.1 as the PHP versions to test that this works.