如何让作曲家安装非作曲家包? [英] How do you get composer to install a non-composer package?
问题描述
我想让作曲家从这个项目下载下面的库,但是它没有一个 composer.json
文件,所以我不确定如果这是可能的。
I am trying to get composer to download the following library from this project, however, it does not have a composer.json
file in it so I'm not sure if this is possible.
{
"require" : {
"fguillot/picoFeed" : "*"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/fguillot/picoFeed"
}
]
}
strong>错误:
Error:
[Composer\Repository\InvalidRepositoryException]
无效的作曲家。 json在
https://github.com/fguillot/picoFeed 的任何分支或标记中找不到,无法加载a package
from it。
[Composer\Repository\InvalidRepositoryException]
No valid composer.json was found in any branch or tag of https://github.com/fguillot/picoFeed, could not load a package from it.
推荐答案
要包含非作曲家库以设置软件包存储库。它会给你像:
To include a non composer repository you need to set up a package repository. Which would give you something like:
{
"repositories": [
{
"type": "package",
"package": {
"name": "fguillot/picoFeed",
"version": "dev-master",
"source": {
"url": "https://github.com/fguillot/picoFeed",
"type": "git",
"reference": "origin/master"
}
}
}
],
"require": {
"fguillot/picoFeed": "dev-master"
}
}
这篇关于如何让作曲家安装非作曲家包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!