0

I have written a library that I want to use in another project. However, when I add the library dependency to my project I get the following error after running composer update -vvv:

Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for my/library dev-master -> satisfiable by my/library[dev-master]. - my/library dev-master requires doctrine/migrations dev-master -> no matching package found. 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. 

This error is very confusing to me since my project has my library as it's only dependency, i.e. my project composer.json looks like this:

{ "name": "my/project", "type": "project", "description": "My project", "autoload": { "psr-0": { "MyNamespace\\": ["src/", "tests/src/"] } }, "repositories": [ { "type": "vcs", "url": "[email protected]:my/library" } ], "require": { "php": ">=5.5", "my/library": "dev-master" }, "require-dev": { "phpunit/phpunit": "3.*" } } 

As you can see, pretty straight forward. The reason the version of my library is requiring dev-master is because master is currently the only branch I work on (I work alone, no need for other branches at the moment).

So far the only way for the resolve this problem is by adding the dependencies of my library composer.json to my project's composer.json which seems like an unnecessary step.

How can I resolve this dependency issue?

1
  • Can you post the rest of the error message? There is usually an indication of which dependency is failing. Also, this section of the Composer manual may help. Commented Apr 9, 2014 at 0:56

1 Answer 1

2

It looks to me as if it is a stability issue. Add the following two lines to your composer.json:-

"minimum-stability": "dev", "prefer-stable": true, 

ref:- minimum-stability & prefer-stable

Hopefully that will sort out your problem.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.