Skip to content
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

Incorrect parsing of latest version.json shows old version as latest #15745

Closed
OlafvdSpek opened this issue Jan 4, 2020 · 5 comments
Closed
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
Milestone

Comments

@OlafvdSpek
Copy link

;)

@williamdes
Copy link
Member

@ibennetch our api does not indicate the right latest version

@ibennetch
Copy link
Member

ibennetch commented Jan 4, 2020

https://www.phpmyadmin.net/home_page/version.json returns an array (if that's the proper way to refer to it in JSON) of currently supported versions:

{
    "date": "2019-12-26",
    "version": "5.0.0",
    "releases": [
        {
            "date": "2019-12-26",
            "php_versions": ">=5.5,<8.0",
            "version": "4.9.3",
            "mysql_versions": ">=5.5"
        },
        {
            "date": "2019-12-26",
            "php_versions": ">=7.1,<8.0",
            "version": "5.0.0",
            "mysql_versions": ">=5.5"
        }
    ]
}

I think that the first/outer 'version' always points to the latest release, so we could first get the "current maximum version" from that before checking that the PHP and MySQL versions are compatible from deeper in the "releases" array.

I'd prefer a solution that improves the parsing within phpMyAdmin rather than changing the versions.json file, because there are times we support more than one version.

@ibennetch ibennetch changed the title latest stable version: 4.9.3 Incorrect parsing of latest version.json shows old version as latest Jan 5, 2020
@Gaurav-Punjabi
Copy link
Contributor

@ibennetch Are you suggesting that we should parse the JSON in such a way that it considers the highest version ?

@ibennetch
Copy link
Member

ibennetch commented Jan 6, 2020 via email

@Gaurav-Punjabi
Copy link
Contributor

Got it 👍
Will submit a PR for this soon.

@williamdes williamdes added Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete and removed infrastructure labels Jan 7, 2020
@williamdes williamdes added this to Needs triage in issues via automation Jan 7, 2020
@williamdes williamdes moved this from Needs triage to to be fixed soon in issues Jan 7, 2020
@williamdes williamdes added this to the 5.0.2 milestone Jan 26, 2020
williamdes added a commit that referenced this issue Feb 14, 2020
Ref: #15952
Ref: #15860

Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from to be fixed soon to Closed Feb 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
issues
  
Closed
Development

No branches or pull requests

4 participants