doctor-command
doctor-command copied to clipboard
Adapt package structure
This PR makes changes to the package structure to fit the one from the bundled plugins:
- Use
WP_CLI\Doctoras the namespace root - Use PSR-4 autoloader
- Use latest
wp-cli-testsframework with Behat v3
@schlessera What do you think about punting on the namespace change, and simply applying the safe bits?
@schlessera @danielbachhuber Apologies for the noise here, but I thought I'd pick this up and help fix all the failing tests. This is now ready for review!
I don't mind the namespace change, I think it should be fine. Just noting that this handbook page needs updating after merge: https://github.com/wp-cli/handbook/blob/7c792d2a11448dab77f23d8055f82553e6dff2a6/doctor-customize-config.md
Makes sense.
Btw, any idea why this one test is failing on 6.2? The 3.7 one I haven‘t looked into yet
Btw, any idea why this one test is failing on 6.2?
$ wp core version
6.2
$ wp core check-update
+---------+-------------+-----------------------------------------------------------------------+
| version | update_type | package_url |
+---------+-------------+-----------------------------------------------------------------------+
| 6.2.3 | minor | https://downloads.wordpress.org/release/wordpress-6.2.3-partial-0.zip |
| 6.3.2 | major | https://downloads.wordpress.org/release/wordpress-6.3.2.zip |
+---------+-------------+-----------------------------------------------------------------------+
$ wp doctor check core-update
+-------------+--------+----------------------------------------------------------------------+
| name | status | message |
+-------------+--------+----------------------------------------------------------------------+
| core-update | error | Updating to WordPress' newest minor version is strongly recommended. |
+-------------+--------+----------------------------------------------------------------------+
Error: 1 check reports 'error'.
It looks like main is passing because behat.yml isn't detected and no tests are being run.
Yes, that I realized. That‘s why I did all these commits to fix tests. Just thought it was weird that it failed for that particular job. But I can adapt the test 👍
OK looks like @require-wp-latest doesn't seem to actually work 🤔
OK looks like
@require-wp-latestdoesn't seem to actually work 🤔
@swissspidy Lovely. Maybe it's not actually a thing!
For Scenario: WordPress is up to date, you could run wp core update prior to wp doctor check core-update. I'd probably do the same for Scenario: Use --spotlight to focus on warnings and errors.
Thanks, yeah I‘ll try that again.
Amd then I guess I‘ll review all existing usage of @require-wp-latest in the code base 🤔
Any idea on the WP 3.7 test? Can‘t run them locally as I don‘t have old PHP installed.
Any idea on the WP 3.7 test? Can‘t run them locally as I don‘t have old PHP installed.
Nothing immediately obvious, no.
Now there are some random errors from extension command as well, like Warning: twentyeleven: version higher than expected.. Core bumped their versions yesterday
but they haven't been released yet in the theme directory. So probably should go away after the 6.4 release tomorrow 🤷
I'll leave this PR be for now, maybe someone else wants to pick it up.