【发布时间】:2016-01-15 16:33:24
【问题描述】:
在作曲家遇到问题。我有一个主要项目,我正在处理我构建的一些小型库,我希望在我的项目之间更轻松地共享这些库。它们还远未准备好发布,所以我不想将它们添加到 packagist,但是当我需要 1 需要另一个时,除非我在我的主 composer.json 上广告该自定义存储库,否则它将出错
另外,第三级需求无法解析 packagegist 库
Your requirements could not be resolved to an installable set of packages.
Problem 1
- ethereal/simpleCache dev-master requires predis/predis ^1.1@dev -> no matching package found.
- ethereal/simpleCache dev-master requires predis/predis ^1.1@dev -> no matching package found.
- Installation request for ethereal/simplecache dev-master -> satisfiable by ethereal/simpleCache[dev-master].
主项目composer.json:
{
"name": "ethereal/SimpleTable",
"type": "project",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/mathus13/SimpleConfig.git"
}
],
"require": {
"php": ">=5.3.9",
"doctrine/dbal": "^2.6@dev",
"ethereal/SimpleConfig": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"autoload": {
"psr-4": {
"Ethereal\\": "lib"
}
}
}
配置库:在 SimpleTable 中运行 composer update 时,除非 SimpleTable 明确要求,否则不会包含 Simple Cache。
{
"name": "ethereal/SimpleConfig",
"type": "project",
"version": "0.0.1",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/mathus13/SimpleCache.git"
}
],
"require": {
"php": ">=5.3.9",
"ethereal/SimpleCache": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"autoload": {
"psr-4": {
"Ethereal\\": "lib"
}
}
}
缓存库:在 SimpleTable 中运行 composer update 时,predis 无法解析。
{
"name": "ethereal/simpleCache",
"type": "project",
"version": "0.0.1",
"require": {
"predis/predis": "^1.1@dev",
"php": ">=5.3.9"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"autoload": {
"psr-4": {
"Ethereal\\": "lib"
}
}
}
【问题讨论】:
标签: php git composer-php