我有一个我已经构建的PHP框架,我正在尝试将所有内容分成不同的repos并将其设置在composer中以使我的生活更轻松.
基本上,我有3个repos问题:一个用于集合类,用作集合数据类型的基类("liftkit/collection"),另一个是输入变量的包装器("liftkit/input",它依赖于集合repo),以及核心的第三个("liftkit/core",它取决于输入包装器.
当我运行composer update"liftkit/input"时,它会安装"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"
}
]
}
Run Code Online (Sandbox Code Playgroud)
任何帮助是极大的赞赏.谢谢.
Rya*_*ams 14
看起来composer不会递归地解析存储库.来自文档:
存储库不会递归解析.您只能将它们添加到主composer.json中.依赖项'composer.jsons的存储库声明被忽略.
所以我想我运气不好.我必须在每个仓库中指定存储库.
| 归档时间: |
|
| 查看次数: |
3434 次 |
| 最近记录: |