composer / package-versions-deprecated

:package: Composer addon to efficiently get installed packages' version numbers
MIT License
1.51k stars 9 forks source link

composer validation fails #30

Closed DigitalTimK closed 2 years ago

DigitalTimK commented 2 years ago

After installling this package with

$ composer require composer/package-versions-deprecated
// composer.json

{
    // ...
    "require": {
         // ...
        "composer/package-versions-deprecated": "1.11.99.3",
        // ...
    }
}

I get this validation error

$ composer validate --strict

./composer.json is valid, but with a few warnings
See https://getcomposer.org/doc/04-schema.md for details on the schema
require.composer/package-versions-deprecated : exact version constraints (1.11.99.3) should be avoided if the package follows semantic versioning
Seldaek commented 2 years ago

Change the constraint to ^1.11.99 and all will be fine. This is just a warning btw in composer, it becomes an error because you use --strict, but that's kinda on you to know what to do if you turn such flags on.