D
D
Dmytro Karpovych2015-12-01 02:11:29
PHP
Dmytro Karpovych, 2015-12-01 02:11:29

Why can't composer resolve dependencies?

Good day.
I am making several related composer packages.
I want to install one of them in the project : composer require nullref/yii2-cms
I get an error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - nullref/yii2-cms dev-master requires nullref/yii2-admin dev-master -> satisfiable by nullref/yii2-admin[dev-master].
    - nullref/yii2-cms v0.0.2 requires nullref/yii2-admin dev-master -> satisfiable by nullref/yii2-admin[dev-master].
    - nullref/yii2-admin dev-master requires nullref/yii2-sb-admin-2 dev-master -> satisfiable by nullref/yii2-sb-admin-2[dev-master].
    - Conclusion: don't install nullref/yii2-sb-admin-2 dev-master
    - Installation request for nullref/yii2-cms >=0.0.2 -> satisfiable by nullref/yii2-cms[dev-master, v0.0.2].

Please tell me what I'm doing wrong.
PS: Sorry for the rather stupid question, just need an outside perspective.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SilverSlice, 2015-12-02
@ZAYEC77

In short: use only stable releases when specifying versions as dependencies in your packages.
Detailed. Composer has a minimum-stability
flag that is used to select packages based on stability during installation. By default, it is equal to stable, i.e. Only stable packages are installed. You can change this behavior by adding the "minimum-stability" parameter to composer.json. Note that this setting only applies to the root package - your main composer.json file. What happens when you issue the composer require nullref/yii2-cms command :
What can be done:
And in conclusion, I give a link to an article with a detailed explanation of minimum-stability.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question