Repository navigation
Added a condition to find the latest compatible version - #15754
Conversation
|
I seem to get this error in my logs after applying your patch. My current branch is QA_5_0, so my current version is 5.0.1-dev and the current downloads offered in version.json are 4.9.3 and 5.0.0.
|
Codecov Report
@@ Coverage Diff @@
## QA_5_0 #15754 +/- ##
=========================================
Coverage ? 53.03%
Complexity ? 14180
=========================================
Files ? 482
Lines ? 62206
Branches ? 0
=========================================
Hits ? 32988
Misses ? 29218
Partials ? 0 |
Fixed it 👍 |
MauricioFauth
left a comment
There was a problem hiding this comment.
Thanks for your contribution.
Tests are failing. See: https://travis-ci.org/phpmyadmin/phpmyadmin/jobs/633798240#L430
can more easily be written Then it wouldn't have the code duplicated. And it wouldn't say "no compatible version" right before it returns the compatible version in the most common case. I tested this version on my 5.0.1 installation. Also, wouldn't this be more readable with the vertical spaces before the comments as used to be there? It's not clear to me if this is the correct solution. If I'm currently on 4.9.3, what should it say? Upgrade to 5.0.1? Or to 4.9.4? Or both? If I'm on 4.9.4, should it be pushing me to 5.0.1 or not? I.e. this fixes the error of showing 4.9.4 as the latest version when on 5.0.1 (which was the problem that I was experiencing), but it may introduce other errors. I think that if I'm currently on
I think that latest release is itself a weak concept that doesn't quite match actual usage. Security-wise, 4.9.4 is probably a bit safer than 5.0.1, as it gets all the security fixes and none of the new features that might require security fixes. So in my opinion, it shouldn't say that 4.9.4 needs updated to 5.0.1, just that that option is available. But the way it works now, it will always suggest converting to one version for everyone. With the buggy behavior that it was telling people to downgrade from 5.0.1 to 4.9.4. |
That's great.
Correct
I agree
I don't know if we currently provide enough information in version.json to display this. If we were to add this,
Hm, this one is a bit more difficult. We don't really want people to stay on 4.9, but if someone decides to stay on 4.9 then perhaps it would be good to announce if a new LTS version is available. I don't think we've encountered this specific situation before since the version check feature has been introduced. I slightly disagree; we're recommending people migrate to 5.x because 4.9 will eventually be deprecated, and for best compatibility with recent MySQL/MariaDB and PHP versions users should upgrade to 5.0, but I can see the case for telling people that a new LTS version is available. I don't know if we currently provide enough metadata in version.json to make that determination. We historically haven't done much to tell people about LTS version support; we have several other notification methods users can subscribe through to find these announcements. This has been used to show the latest stable version, and I'm not sure that fixing that is going to be easy.
|
Okay i'll make these changes in the code to make it clean. |
|
For the LTS/security part see #12506 |
bc55abb to
de25b76
Compare
Co-authored-by: William Desportes <[email protected]> Signed-off-by: Gaurav Punjabi <[email protected]>
|
Hi everyone |
|
Thank you @Gaurav-Punjabi for the initial work on this issue ! |
Glad I could help. |
Signed-off-by: Gaurav Punjabi [email protected]
Description
Added a condition getLatestCompatibleVersion() to fetch the latest compatible version.
Please describe your pull request.
Fixes #15745
Before submitting pull request, please review the following checklist:
Signed-off-byline as described in our DCO. This ensures that the work you're submitting is your own creation.