1

Can you please help me to understand stability concept in composer

  1. What makes a package considered as a particular stability?

    • is it tag name?
    • is it branch name?
    • or something else?
  2. When you create a package, how to set its stability, can you give examples for:

    • dev
    • alpha
    • beta
    • RC
    • stable
  3. Can package A be considered stable if it requires as dependecy B that is dev?
  4. If I have a package Bar tagged v0.1.3 with composer.json with

"minimum-stability": "stable"

and I require to Bar package another package by cli command

composer require symfony/dom-crawler:4.2

There is no problem and the package is installed.

But when I have package Baz that has same as Bar composer.json

"minimum-stability": "stable"

and i require to the Baz package of Bar

composer require bar/package

i get error:

Installation request for bar/package ^0.1.3 satisfiable by bar/package[^0.1.3]

bar/package ^0.1.3 requires symfony/dom-crawler 4.2 -> satisfiable by symfony/dom-crawler[v4.2.0] but these conflict with your requirements or minimum-stability.

How this can conflict with minium stability? Both Bar and Baz have the same minimum stability in their composer.json

"minimum-stability": "stable"

and when I requested symfony/dom-crawler in Bar there was no conflict, so why there is a conflict when i require Baz as depencedny in Bar?

  1. Is package symfony/dom-crawler[v4.2.0] stable? and if not then what it is in terms of stability?
Jimmix
  • 5,644
  • 6
  • 44
  • 71
  • Recognizing package versions is Packagist job. Read this for explanation: https://packagist.org/about – Jakub Matczak Feb 07 '19 at 14:39
  • https://semver.org/#spec-item-4 says: Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable. So I think I rather can have Baz causing confict (its v0.1.3) than the symfony package but if so then why composer complains about symfony package and not the Baz package not fulfilling minimum stability? – Jimmix Feb 07 '19 at 15:05

0 Answers0