PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, January 30, 2022

[FIXED] Composer won't install dependency

 January 30, 2022     composer-php, packagist, php     No comments   

Issue

I have created a composer package with this composer.json

{
    "name": "webiny/cache",
    "type": "library",
    "minimum-stability": "dev",
    "require": {
        "php": ">=5.4.0",
        "jamm/memory": "dev-master"
    },
    "require-dev": {
        "phpunit/phpunit": "4.1.*"
    },
    "autoload": {
        "psr-4": {
            "Webiny\\Component\\Cache\\": ""
        }
    },
    "extras": {
        "branches": {
            "dev-master": "~0.9"
        }
    }
}

I'm having a problem with resolving jamm/memory package when I do a composer install on this file:

{
    "require": {
        "webiny/cache": "dev-master"
    }
}

The error I get is

  Problem 1
    - Installation request for webiny/cache dev-master -> satisfiable by webiny/cache[dev-master].
    - webiny/cache dev-master requires jamm/memory dev-master -> no matching package found.

When I just try to install the jamm/memory if works fine:

{
    "require": {
        "jamm/memory": "dev-master"
    }
}

I have the minimum-stability flag set to dev in webiny\cache. I have also tried setting the release to @dev on jamm/memory dependency...didn't help.

I can't figure out what I'm doing wrong.


Solution

Solved it.... I added the minimum-stability flag to the composer.json file that I used to install the libraries...not just on the composer.json file that is used to define a package.



Answered By - SlasherZ
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing