Opened 6 years ago
Closed 6 years ago
#4380 closed defect (bug) (fixed)
Plugin Directory: Be more flexible with the detected current major WP version
Reported by: | Ipstenu | Owned by: | dd32 |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description
Looking at the code for get_current_major_wp_version, it does the following checks:
1) Is there a define set
2) If not, what version is WP.org running
3) If that version is NOT a stable release (i.e. has a - in the name), drop it down
The problem here is that value is checked when seeing if a plugin is tested up to the current stable version, and some developers want to update their code once they've tested against Beta releases. This is a good practice, and should be encouraged, however as it stands today, their plugins will throw an error if the version is higher.
This should be changed to factor in a +1 version or to allow for RCs... Or be something we can edit without messing with the define WP_CORE_LATEST_RELEASE
Change History (8)
#2
in reply to:
↑ description
@
6 years ago
Replying to Ipstenu:
The problem here is that value is checked when seeing if a plugin is tested up to the current stable version, and some developers want to update their code once they've tested against Beta releases. This is a good practice, and should be encouraged, however as it stands today, their plugins will throw an error if the version is higher.
This should be changed to factor in a +1 version or to allow for RCs...
I haven't tested yet, but looking at the (float)$version > (float)WP_CORE_STABLE_BRANCH+0.1
condition, that seems to be the case.
Does Tested up to: 5.2
currently cause a warning? Is it a warning in the readme validator, or the "has not been tested with the latest 3 major releases" plugin banner?
#3
@
6 years ago
But really, if plugins are testing with betas, that's not the same as a release. I don't think they should be able to say that it's tested with a release unless it actually is (more than a beta).
Yes that's why I said to allow for RC. Not betas :)
Does Tested up to: 5.2 currently cause a warning? Is it a warning in the readme validator, or the "has not been tested with the latest 3 major releases" plugin banner?
It causes the 'has not been tested...' banner.
This ticket was mentioned in Slack in #meta by ipstenu. View the logs.
6 years ago
#5
@
6 years ago
- Owner set to dd32
- Status changed from new to accepted
Yay PHP, or rather, Yay Floats! :)
This is because (float)'5.2' > ((float)'5.1'+0.1)
is true
, in other words (float)'5.2' !== (float)'5.1'+0.1
- even though the human readable version are the same when you look at the underlying values you eventually come to a 0.000000000000000000000000000000[1-9] value that trips up the calculations.
#7
follow-up:
↓ 8
@
6 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
The ticket was about the "has not been tested..." banner though, not the readme validator. That's why I asked in comment:2 :)
#8
in reply to:
↑ 7
@
6 years ago
- Resolution set to fixed
- Status changed from reopened to closed
Replying to SergeyBiryukov:
The ticket was about the "has not been tested..." banner though, not the readme validator. That's why I asked in comment:2 :)
Same thing :)
The readme parser was ignoring the 5.2
value. That caused the readme validator to throw a warning, but also caused the plugin to have no tested up to
value, which subsequently causes the banner to show up (stupidly IMHO, when the 'Requres at least' header was set to 5.0
).
Template::is_plugin_outdated()
used version_compare()
already, so not a problem there
But really, if plugins are testing with betas, that's not the same as a release. I don't think they should be able to say that it's tested with a release unless it actually is (more than a beta).