phpcomposer-phppackagistsatis

Satis circular dependencies


I have a project with multiple packages Each package is in a private git repository.

Some of the packages have dependencies of each other.

You can check here how my satis http://codepen.io/anon/pen/wBOEQW page looks like.

Now if I clone the project-xpto/core, and run a composer update i get this:

➜ php-core git:(master) composer update Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for project-xpto/event dev-master -> satisfiable by project-xpto/event[dev-master].
    - project-xpto/event dev-master requires project-xpto/activity-streams dev-master -> no matching package found.
  Problem 2
    - Installation request for project-xpto/tool dev-master -> satisfiable by project-xpto/tool[dev-master].
    - project-xpto/tool dev-master requires project-xpto/activity-streams 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.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Isn't suppose to satis resolve all dependencies and all work fine?

What i'm doing wrong?

If you need anything else, just ask i will update here.


Solution

  • Please give this a try:

    add "minimum-stability": "dev" to the composer.json of project-xpto/core.

    You require a lot of dev-master stability packages, but the default minimum-stability is stable. So they are not resolved to a stable set. You need to lower stability for all packages to dev by setting the above directive in your main projects composer.json.

    Alternatively you could use dev-master@dev to lower stability on a specific package. But here it's quite a number of packages, so i would suggest to set minimum-stability dev for the whole project.


    You can combine "minimum-stability dev" with "prefer-stable true". This tells Composer to resolve to stable versions AND ONLY if stable could not be resolved, use a dev dependency. This setting is a good way in the starting phase of a private project, where packages start to grow out of "dev-master" and into "stable versions".

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