Composer不会安装依赖项 [英] Composer won't install dependency

查看:280
本文介绍了Composer不会安装依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用此composer.json创建了一个composer程序包

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"
        }
    }
}

在此文件上执行作曲家安装时,我在解决jamm/memory软件包时遇到问题:

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

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

我得到的错误是

  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.

当我尝试安装jamm/memory时,如果工作正常:

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

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

我在webiny\cache中将minimum-stability标志设置为dev.我也尝试过将发布版本设置为jamm/memory依赖项的@dev ...无济于事.

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.

推荐答案

解决了.... 我在用于安装库的composer.json文件中添加了minimum-stability标志,而不仅仅是在用于定义软件包的composer.json文件中.

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.

这篇关于Composer不会安装依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆