rayphi rayphi - 21 days ago 7
PHP Question

Why this unexpected composer version result?

I have the following two packages

Package :

"my/package"


Releases
0.8.9, 0.8.8, 0.8.7, 0.8.6, 0.8.5, 0.8.4, 0.8.3, 0.8.2, 0.8.1, 0.8.0, 0.7.4, ...


Package :
"my/package2"


Releases:
0.1.1, 0.1.0


My default composer.json config with strange behavior installs:

{
"minimum-stability" : "stable",
"require" : {
"my/package" : "*",
"my/package2" : "*"
}
}


Result:


  • "my/package"@0.8.0

  • "my/package2"@0.1.1



If I change the config to the following:

{
"prefer-stable": true,
"minimum-stability" : "dev",
"require" : {
"my/package" : "*",
"my/package2" : "*"
}
}


Result:


  • "my/package"@0.8.9

  • "my/package2"@0.1.1



why installs my default config
"my/package"@0.8.0
and not
@0.8.9
?

Answer

So the answer in my case is realy simple:

The package "my/package" has since version 0.8.1 a requirement to "my/package3"@dev-master wich also classify "my/package"as not stable.