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

composer outdated listing packages without latest version #9602

Closed
dominik-eller opened this issue Jan 12, 2021 · 5 comments
Closed

composer outdated listing packages without latest version #9602

dominik-eller opened this issue Jan 12, 2021 · 5 comments
Labels
Milestone

Comments

@dominik-eller
Copy link

when I run composer outdated --direct --locked --format=json I get a list of outdated packages, but some of them are missing the latest version. But when i run composer show package/name -a I get the newer versions available.

For Example:
{ "name": "xtento/module-stockimport", "version": "2.10.2", "description": "XTENTO Stock Import Module" },

and

name : xtento/module-stockimport descrip. : XTENTO Stock Import Module keywords : versions : 2.10.8, 2.10.7, 2.10.6, 2.10.5, 2.10.4, 2.10.3, * 2.10.2, 2.10.1, 2.10.0, 2.9.9, 2.9.8, 2.9.7, 2.9.6, 2.9.5, 2.9.4, 2.9.3, 2.9.2, 2.9.1, 2.9.0, 2.8.9, 2.8.8, 2.8.7, 2.8.6, 2.8.5, 2.8.4, 2.8.3, 2.8.2, 2.8.1, 2.8.0, 2.7.9, 2.7.8, 2.7.7, 2.7.6, 2.7.5, 2.7.4, 2.7.3, 2.7.2, 2.7.1, 2.7.0, 2.6.9, 2.6.8, 2.6.7, 2.6.6, 2.6.5, 2.6.4, 2.6.3, 2.6.2, 2.6.1, 2.6.0, 2.5.9, 2.5.8, 2.5.7, 2.5.6, 2.5.5, 2.5.4, 2.5.3, 2.5.2, 2.5.1, 2.5.0, 2.4.9, 2.4.8, 2.4.7, 2.4.6, 2.4.5, 2.4.4, 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.9, 2.3.8, 2.3.7, 2.3.6, 2.3.5, 2.3.4, 2.3.3, 2.3.2, 2.3.1, 2.3.0, 2.2.9, 2.2.8, 2.2.7, 2.2.6, 2.2.5, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2.0, 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4, 2.1.3, 2.1.2, 2.1.1, 2.1.0, 2.0.9

@Seldaek
Copy link
Member

Seldaek commented Jan 12, 2021

Not enough info here to even attempt to reproduce..

@DuckThom
Copy link

For anyone also running into this: I just had this locally and this seems to be happening when composer cannot resolve to a compatible latest version.

For example, if a package is currently locked to 1.0.1 and the latest is 1.0.4 and only supports php up to 7.4 and not 8.0. If you then run composer outdated --direct --locked with php 8.0, the latest version will not be shown.

In my case, my Magento project is running on 7.4 and the outdated command was only showing

        {
            "name": "tig/postnl-magento2",
            "version": "1.9.8",
            "description": "TIG Magento 2 PostNL extension"
        }

in the json output even though 1.9.9 exists. As it turned out, I was running the composer command using php 8.0 and that module does not support 8.0 yet. After using composer with php 7.4, the output listed the expected version:

        {
            "name": "tig/postnl-magento2",
            "version": "1.9.8",
            "latest": "1.9.9",
            "latest-status": "semver-safe-update",
            "description": "TIG Magento 2 PostNL extension"
        }

@imme-emosol
Copy link
Contributor

Essentially this is a request for the command composer outdated to ignore the platform it is on?
The current behavior seems to be to take platform requirements into account.
The returned result is correct from that train of thought.

@DuckThom
Copy link

@imme-emosol That would be nice to have imo. A '--ignore-platform-reqs' option or something to just get the latest version of a package, even if it's not compatible with the current platform. The same would probably go for composer show as that also doesn't have a 'latest' key in the output when the latest version is not compatible with the current platform (ie. php 8.0).

❯ php -v
PHP 8.0.10 (cli) (built: Aug 26 2021 15:36:17) ( NTS )
❯ composer show -a --latest magento/product-community-edition | grep latest

No output, as the latest magento version is not compatible yet with php 8. However, when running the same composer show command with php 7.4, it does list the latest version.

/usr/local/Cellar/php@7.4/7.4.23/bin/php $(which composer) show -a --latest magento/product-community-edition | grep latest
latest   : 2.4.3-p1

@Seldaek
Copy link
Member

Seldaek commented Nov 24, 2021

Fixed by #10293 which adds --ignore-platform-reqs/--ignore-platform-req to the outdated command.

@Seldaek Seldaek closed this as completed Nov 24, 2021
@Seldaek Seldaek added this to the 2.2 milestone Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants