更新时间:2023-11-17 09:12:04
根据 @stof 在GitHub上发表的评论, Composer 不支持加载类型为 package
的存储库中的 composer.json
文件. package
类型的目标是下载不支持 Composer 的项目.因此,从不读取文件 composer.json
.
As per @stof comment at GitHub, Composer doesn't support loading of composer.json
file from the repositories of the type package
. The goal of a package
type is to download projects which are not supporting Composer. Therefore composer.json
file is never read.
解决方案是改用 vcs
类型.这是应该起作用的 composer.json
:
Solution is to use vcs
type instead. Here is the composer.json
which should work:
{
"require": {
"queueit/knownuserv3": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/queueit/KnownUser.V3.PHP"
}
]
}
否则,您将必须在软件包存储库中完全复制项目元数据,这很难维护."
Otherwise "you would have to copy the project metadata entirely in your package repository, and this is harder to maintain".