首先,有一些相关的帖子并不真正适合我的问题。
还有更多。
我有一个包含一些私有包的 Symfony 项目。这些被 vcs 引用:
"repositories": [
{
"type": "vcs",
"url": "git@aaaaa.git"
},
{
"type": "vcs",
"url": "git@xxxxx.git"
},
{
"type": "vcs",
"url": "git@yyyyy.git"
}
],
这像预期的那样工作。但是,私有包 yyyy 引用了另一个私有包(我们称之为 sub-yyyy),该私有包也被包 composer.json 文件中的 vcs 类型引用。
如果我运行 composer install 它失败并显示以下消息:
问题 1 - yyyy 的安装请求 -> yyyy]。- yyyy 需要 sub-yyyy ^1.0.0 -> 找不到匹配的包。
潜在原因:
- 包名有错别字
- 根据您的最低稳定性设置,该软件包在足够稳定的版本中不可用,有关更多详细信息,请参阅 https://getcomposer.org/doc/04-schema.md#minimum-stability。
- 这是一个私有包,您忘记添加自定义存储库来查找它
私有包(子 yyyy)是由 v1.0.0 标记的,如果它在主项目的 composer.json 文件中,则可以安装。
主项目的composer.json(需要删减):
{
"name": "main/project",
"license": "proprietary",
"type": "project",
"prefer-stable": true,
"repositories": [
{
"type": "vcs",
"url": "git@aaaaa.git"
},
{
"type": "vcs",
"url": "git@xxxxx.git"
},
{
"type": "vcs",
"url": "git@yyyyy.git"
}
],
}
yyyy 包的 composer.json:
{
"name": "yyyy",
"type": "symfony-bundle",
"require": {
"sub-yyyy": "^1.0.0"
},
"repositories": [
{
"type": "vcs",
"url": "git@sub-yyyy.git"
}
],
"minimum-stability": "dev",
}
yyyy
当我安装引用的软件包时,有什么想法可以解决这个问题sub-yyyy
吗?