Reputation: 2958
I am having this error when running composer update which has never happened before. Instead of asking a specific question for this installation, could anyone provide me with a translation of what this error message means?
Your requirements could not be resolved to an installable set of packages.
Problem 1
- skullyframework/skully-admin v0.1.3 requires symfony/console 2.5.x-dev -> no matching package found.
- skullyframework/skully-admin v0.1.2 requires symfony/console 2.5.x-dev -> no matching package found.
- skullyframework/skully-admin v0.1.1 requires symfony/console 2.5.x-dev -> no matching package found.
- Installation request for skullyframework/skully-admin 0.1.* -> satisfiable by skullyframework/skully-admin[v0.1.1, v0.1.2, v0.1.3].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
If it may help, my composer.json looks like this:
{
"name": "xxx",
"description": "xxx",
"minimum-stability": "stable",
"require-dev": {
"phpunit/phpunit": "3.7.28",
"phpunit/phpunit-selenium": ">=1.2",
"phpunit/dbunit": ">=1.2",
"mikey179/vfsStream": "v1.2.0"
},
"require": {
"phpmailer/phpmailer": "v5.2.7",
"skullyframework/skully": "0.1.*",
"skullyframework/skully-admin": "0.1.*"
},
"autoload": {
"psr-0": {
"App\\": "",
"HtmlPlainText" : "library/htmlPlainText"
}
},
"license": "MIT"
}
Upvotes: 0
Views: 99
Reputation: 70863
You asked for a translation of that error message, so here we go:
Your requirements could not be resolved to an installable set of packages.
Composer is stating that based on the requirements of packages, versions, and stability level, it was not able to resolve all these dependencies without contradictions.
Problem 1
- skullyframework/skully-admin v0.1.3 requires symfony/console 2.5.x-dev -> no matching package found.
- skullyframework/skully-admin v0.1.2 requires symfony/console 2.5.x-dev -> no matching package found.
- skullyframework/skully-admin v0.1.1 requires symfony/console 2.5.x-dev -> no matching package found.
- Installation request for skullyframework/skully-admin 0.1.* -> satisfiable by skullyframework/skully-admin[v0.1.1, v0.1.2, v0.1.3].
Lets look at this detail message backwards. The last line lists which versions of the package were considered. Composer was looking at skullyframework/skully-admin
, which you required to be 0.1.*
. It detected that there are the following versions available matching this version requirement: v0.1.1, v0.1.2, v0.1.3
All the lines above list for each of these versions why the particular version was not satisfying the requirements.
You are probably right that these lines alone do not explain by themself why an existing branch 2.5.x-dev
was not considered "a matching package". A hint explaining that despite the branch existing it was not considered due to your minimum-stability:stable requirement would be nice. But: The hint is already there, unfortunately buried in the last few lines that nobody ever reads:
The package is not available in a stable-enough version according to your minimum-stability setting
That is however still not a very good pointer to explain what went wrong.
Following the link will take you to an announcement stating that Composer switched the minimum stability from "dev" to "stable" in July 2012, with a pointer to the Composer documentation page and a short discussion about the fact that minimum stability is a root package setting only.
So having the main package enforce stable means that all sub packages cannot depend on packages with less than stable stability (which excludes any development version branch like 2.5.x-dev
).
It is however a bad idea to lower the minimum stability in your project to "dev", because this will affect ALL packages you are using, and all their dependencies, leading to most packages being installed in a development version if they exist, and are in a newer version than the last stable version but still match the version requirement.
Composer has a setting that tries to avoid dealing with all packages being dev stability, but only the needed ones: prefer-stable:true
And you could solve the problem by another way: You can explicitly include the "missing" development package in your root project like this:
"require": {
"symfony/console": "2.5.x-dev"
}
General conclusion: Avoid using unstable packages. And using packages tha are using unstable packages.
Upvotes: 1
Reputation: 4244
If you look at skullyframework/skully-admin , version 0.1 in the require it needs
php: >=5.4
symfony/console: 2.5.x-dev
skullyframework/skully: 0.1.*
Please not the dependency on symfony/console 2.5.x-dev.
And in your composer.json you have explicitly mentioned only to download the stable version (see minimum-stability flag). That means composer when looking at packagist could not resolve the required dependency.
If in skullyframework/skully-admin they have mentioned 2.5.* as the dependency as https://packagist.org/packages/symfony/console already released the version you would have downloaded the same.
Same applies to any packages if some error like this is shown.
In this case one alternative is let composer download the dev version. So keep
"minimum-stability": "dev"
Hope that helps!
Thank you
Upvotes: 1