【发布时间】:2015-04-18 12:17:33
【问题描述】:
我已经构建了一个 PHP 框架,我正在尝试将所有内容分成不同的存储库并在 composer 中进行设置,以使我的生活更轻松。
基本上,我有 3 个有问题的存储库:一个用于作为集合数据类型基类的集合类(“liftkit/collection”),另一个是输入变量的包装器(“liftkit/input”,这取决于集合 repo),第三个用于核心(“liftkit/core”,这取决于输入包装器。
当我在“liftkit/input”上运行 composer update 时,它会安装“liftkit/collection”并且工作正常,但是当我在“liftkit/core”上运行它时,它会出现以下错误:
问题 1 - liftkit/input @dev 的安装请求 -> liftkit/input[dev-master] 可满足。 - liftkit/input dev-master 需要 liftkit/collection dev-master -> 找不到匹配的包。
这是我的 composer.json 文件:
{
"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"
}
]
}
非常感谢任何帮助。谢谢。
【问题讨论】:
标签: git composer-php