Properly support `@require-wp-latest`
swissspidy opened this issue · comments
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
I spotted a few instances of @require-wp-latest
in our code base, but I don't think it actually works. At least that wasn't the case when I tried it at wp-cli/doctor-command#165
run-behat-tests
already grabs the latest version of WordPress, so when we do things like WP_VERSION=6.2 composer behat
, it could pass this info on to behat-tags.php
so that the script knows that 6.2 is lower than the current latest.
Describe what you would expect as the correct outcome
@require-wp-latest
works as expected
Provide a possible solution
Provide additional context/Screenshots
@swissspidy This is perpetually skipped - see
wp-cli-tests/utils/behat-tags.php
Lines 46 to 60 in 560ed5c
Yeah I saw that code too. The thing is:
- We still use
@require-wp-latest
in many tests, despite it not working - We can actually make it work
I'd suggest we actually remove @require-wp-latest
. It's ambiguous, and I don't think it's entirely necessary.
We still use
@require-wp-latest
in many tests, despite it not working
I only see one use: https://github.com/search?q=org%3Awp-cli%20require-wp-latest&type=code
Are there others?
I only see one use: github.com/search?q=org%3Awp-cli%20require-wp-latest&type=code
Are there others?
I think you're right! I just double checked and I just saw tons of duplicates in all the different vendor
folders, so yeah just that one.
I suppose it not even working shows how unnecessary it can be in that test there.