Composer - 找不到匹配的包
Composer - No Matching Package Found
我有一个自己构建的 PHP 框架,我正在尝试将所有内容分离到不同的存储库中,并在 composer 中进行设置,让我的生活更轻松。
基本上,我有 3 个存储库有问题:一个用于集合 class,作为集合数据类型 ("liftkit/collection") 的基础 class,另一个是包装器用于输入变量("liftkit/input",这取决于集合回购协议),第三个用于核心变量("liftkit/core",这取决于输入包装器。
当我 运行 composer update
在 "liftkit/input" 上时,它安装 "liftkit/collection" 并且工作正常,但是当我 运行 在 "liftkit/core" 上安装它时它给了我以下错误:
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.
这是我的 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"
}
]
}
非常感谢任何帮助。谢谢
看起来 composer 不会递归地解析存储库。来自文档:
Repositories are not resolved recursively. You can only add them to
your main composer.json. Repository declarations of dependencies'
composer.jsons are ignored.
所以我想我运气不好。我必须在每个 repo 中指定存储库。
我有一个自己构建的 PHP 框架,我正在尝试将所有内容分离到不同的存储库中,并在 composer 中进行设置,让我的生活更轻松。
基本上,我有 3 个存储库有问题:一个用于集合 class,作为集合数据类型 ("liftkit/collection") 的基础 class,另一个是包装器用于输入变量("liftkit/input",这取决于集合回购协议),第三个用于核心变量("liftkit/core",这取决于输入包装器。
当我 运行 composer update
在 "liftkit/input" 上时,它安装 "liftkit/collection" 并且工作正常,但是当我 运行 在 "liftkit/core" 上安装它时它给了我以下错误:
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.
这是我的 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"
}
]
}
非常感谢任何帮助。谢谢
看起来 composer 不会递归地解析存储库。来自文档:
Repositories are not resolved recursively. You can only add them to your main composer.json. Repository declarations of dependencies' composer.jsons are ignored.
所以我想我运气不好。我必须在每个 repo 中指定存储库。