-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix npm run test:php
errors in wp-env package
#7264
Conversation
After @wordpress/env 5.0 you need to define WP_PHPUNIT__TESTS_CONFIG env for WP Tests config file
Plugin builds for 1bf9ab3 are ready 🛎️!
|
Note: Running |
OK, so does
|
@westonruter Can you please confirm once if your Confirmed the wp-env version with |
By default, wp-env considers the latest WP release and its matching test suite from the trunk and its compatible PHPUnit version which in the case right now is My thoughts are:
In the wiki/docs, we can refer the user to |
I just did the following:
And I get the same internal server error I got above. When I run So I don't know what's going on. I'll look a bit deeper. In terms of testing, we should default to the latest stable version of WordPress. Testing against |
Strange. The error I'm getting is:
Indeed, there is no There seems to be a version mismatch problem here. It seems Compare these two lines: https://github.com/WordPress/wordpress-develop/blob/0e924d96aaff3ad5000f9c9f2aa4998419d75284/tests/phpunit/includes/install.php#L43 The change seems to have come from WordPress/wordpress-develop@fdb6e13 as part of WPCORE-56268. So the problem is that the test suite PHP includes is coming from If the version is made consistent then this problem would be fixed. |
@westonruter Exactly. Have you tried changing the Or, with the trunk tests specify |
… version By default keep the stable version and matching test suite version. Anyone can use a .wp-env.override.json file to override current configs
@westonruter My idea is to keep the latest stable WP version in our config. Later if anyone wants to run tests on another version, they can define a After 84162d0 I tried running tests with WP 5.6 in {
"core": "WordPress/WordPress#5.6"
} |
With the latest changes, it's working now. Nevertheless, it still doesn't seem all the versions are in sync. Inside of my
The problem is that it is installing WP I don't see a way to reference the latest stable version. Can the three copies of WP all be set to be |
Yes, it's possible. In that case we need to specify the core as With this combination, running wordpress-develop/src/wp-includes/version.php
19:$wp_version = '6.1-beta1-54282-src';
WordPress/wp-includes/version.php
19:$wp_version = '6.1-beta1-54285';
tests-WordPress/wp-includes/version.php
19:$wp_version = '6.1-beta1-54285'; I am a little confused about the Try changes at 1bf9ab3. Thanks for the |
Excellent. I'm seeing:
I can see that r54288 is WordPress/wordpress-develop@ac8ccca which is the current It is indeed strange about r54282. Not sure why it is 6 revisions behind. Anyway, it's working much better now so I'm merging. Thanks! |
These are differing revisions: Perhaps one of the copies of WP is using a nightly build pegged at the most recent beta release? |
I think trac and git trunk are not in sync. Probably they got synced nightly? I will check it tomorrow, to check if both are in sync. |
With the update to wp-env 5.0.0, running
npm run test:php
now results in a fatal error. After@wordpress/env 5.0
you need to defineWP_PHPUNIT__TESTS_CONFIG
env for WP Tests config file.See package release notes.
Summary
Fixes #7263
Checklist