I am using Composer version 2.0.8, with Docker.
When I use the command composer outdated -f json
inside a composer project, the field “latest”, giving the latest version available for a library, is wrong. (https://getcomposer.org/doc/03-cli.md#outdated)
Instead, the fields contains a version number that is not the latest version available (when i check on https://packagist.org/).
For example, the command says that the latest version for the bundle twig/twig
is v1.42.5, while the version 3.3.0 is already out (https://packagist.org/packages/twig/twig)
Similarly with symfony/symfony
, the command says that the latest version is v3.4.47
Anyone had this problem ? Thank you very much for any answers
EDIT : For the tests i used this composer.json file : https://github.com/MathisLAURENT/Test/blob/master/a/very/long/path/to/source/composer.json And i use Composer 2.0.8 inside a Docker container.
Advertisement
Answer
The PHP version (5.5.2) of the composer.json is to old for the newer version of composer packages. If you upgrade the php version to 7.4 in the docker container and in the composer.json, it will install the newer versions of the packages.