Composer – No Matching Package Found

I have a PHP framework I’ve built, and I’m trying to separate everything into different repos and get it set up in composer to make my life easier.

Basically, I have 3 repos in question: one is for a collection class that serves as a base class for collection data types (“liftkit/collection”), another is a wrapper for input variables (“liftkit/input”, which depends on the collection repo), and a third that is for the core (“liftkit/core”, which depends on the input wrapper.

  • Make exception to gitignore file
  • Reset GitHub login when using composer install
  • How to run a laravel git clone in local
  • Composer installs TCPDF with .git repository
  • How to use SSH id file from an ANT target called by Jenkins which uses Composer to clone library from GitLab?
  • Updating project version: Composer
  • When I run composer update on “liftkit/input”, it installs “liftkit/collection” and works fine, but when I run it on “liftkit/core” it gives me the following error:

    Problem 1
    – Installation request for liftkit/input @dev -> satisfiable by liftkit/input[dev-master].
    – liftkit/input dev-master requires liftkit/collection dev-master -> no matching package found.

    Here are my composer.json files:

    {
        "name": "liftkit/collection",
        "description": "LiftKit base class for collections",
        "license": "LGP-2.1",
        "autoload": {
            "psr-4": {
                "LiftKit\\": "src/"
            }
        },
        "require": {
        },
        "require-dev": {
            "phpunit/phpunit": "4.5.*"
        }
    }
    
    {
        "name": "liftkit/input",
        "description": "LiftKit input wrappers",
        "license": "LGP-2.1",
        "autoload": {
            "psr-4": {
                "LiftKit\\": "src/"
            }
        },
        "require": {
            "liftkit/collection": "dev-master"
        },
        "require-dev": {
            "phpunit/phpunit": "4.5.*"
        },
        "repositories": [
            {
                "type": "git",
                "url": "https://github.com/liftkit/collection"
            }
        ]
    }
    
    {
        "name": "liftkit/core",
        "description": "LiftKit Core Libraries",
        "license": "LGP-2.1",
        "minimum-stability": "dev",
        "autoload": {
            "psr-4": {
                "LiftKit\\": "src/"
            }
        },
        "require": {
            "liftkit/input": "dev-master",
            "liftkit/dependency-injection": "dev-master"
        },
        "require-dev": {
            "phpunit/phpunit": "4.5.*"
        },
        "repositories": [
            {
                "type": "git",
                "url": "https://github.com/liftkit/input"
            },
            {
                "type": "git",
                "url": "https://github.com/liftkit/dependency-injection"
            }
        ]
    }
    

    Any help is greatly appreciated. Thanks.

  • Order branches in `git branch --all` by branch name
  • Ruby on Rails - Uncaught ReferenceError: $ is not defined
  • How to fix cascading branches rebasing mess
  • How to determine if Git handles a file as binary or as text?
  • Visual Studio Team Explorer is listing changes to files I didn't make
  • Is there a reflog for the index?
  • 2 Solutions collect form web for “Composer – No Matching Package Found”

    Looks like composer won’t resolve repositories recursively. From the docs:

    Repositories are not resolved recursively. You can only add them to
    your main composer.json. Repository declarations of dependencies’
    composer.jsons are ignored.

    So I guess I’m out of luck. I’ll have to specify the repositories in each repo.

    Looks you try to require unstable package that depends on another unstable package.

    Possible solutions:

    1. Use tags, that way composer knows what version to install (I’d recommend that)
    2. Name all repositories you need in your main composer with @dev tag

      "liftkit/input": "@dev",
      "liftkit/collection": "@dev"
      
    Git Baby is a git and github fan, let's start git clone.