我正在尝试创建一个下载特定版本燃料的composer.json
。目前这很简单:
{
"require": {
"fuel/fuel": "dev-1.7/master"
}
}
但无法安装,因为packagist here上列出的所有内容都无法满足所有依赖项。我试过1.6,1.7,1.8。
我误解了什么吗?为什么我不能用作曲家下载燃料?
编辑:为了清楚起见,我不打算创建一个全新的项目,而是只在现有项目中下载fule库。 @gellu向我展示了如何手动添加不在packagist上的存储库,并依赖fuel/core
(而不是燃料本身,下载文档,示例和许多其他我不需要的东西),我能够按我想要的方式下载库
答案 0 :(得分:1)
手动添加所有存储库将有所帮助:
{
"repositories": [
{
"type": "package",
"package": {
"name": "fuel/auth",
"type": "fuel-package",
"version": "1.7.2",
"dist": {
"url": "https://github.com/fuel/auth/archive/1.7/master.zip",
"type": "zip"
},
"source": {
"url": "https://github.com/fuel/auth.git",
"type": "git",
"reference": "1.8/develop"
}
}
},
{
"type": "package",
"package": {
"name": "fuel/email",
"type": "fuel-package",
"version": "1.7.2",
"dist": {
"url": "https://github.com/fuel/email/archive/1.7/master.zip",
"type": "zip"
},
"source": {
"url": "https://github.com/fuel/email.git",
"type": "git",
"reference": "1.8/develop"
}
}
},
{
"type": "package",
"package": {
"name": "fuel/oil",
"type": "fuel-package",
"version": "1.7.2",
"dist": {
"url": "https://github.com/fuel/oil/archive/1.7/master.zip",
"type": "zip"
},
"source": {
"url": "https://github.com/fuel/oil.git",
"type": "git",
"reference": "1.8/develop"
}
}
},
{
"type": "package",
"package": {
"name": "fuel/orm",
"type": "fuel-package",
"version": "1.7.2",
"dist": {
"url": "https://github.com/fuel/orm/archive/1.7/master.zip",
"type": "zip"
},
"source": {
"url": "https://github.com/fuel/orm.git",
"type": "git",
"reference": "1.8/develop"
}
}
},
{
"type": "package",
"package": {
"name": "fuel/parser",
"type": "fuel-package",
"version": "1.7.2",
"dist": {
"url": "https://github.com/fuel/parser/archive/1.7/master.zip",
"type": "zip"
},
"source": {
"url": "https://github.com/fuel/parser.git",
"type": "git",
"reference": "1.8/develop"
}
}
},
{
"type": "package",
"package": {
"name": "fuel/core",
"type": "fuel-package",
"version": "1.7.2",
"dist": {
"url": "https://github.com/fuel/core/archive/1.7/master.zip",
"type": "zip"
},
"source": {
"url": "https://github.com/fuel/core.git",
"type": "git",
"reference": "1.8/develop"
}
}
},
{
"type": "package",
"package": {
"name": "fuel/docs",
"type": "fuel-package",
"version": "1.7.2",
"dist": {
"url": "https://github.com/fuel/docs/archive/1.7/master.zip",
"type": "zip"
},
"source": {
"url": "https://github.com/fuel/docs.git",
"type": "git",
"reference": "1.8/develop"
}
}
}
],
"require": {
"fuel/fuel": "dev-1.7/master"
}
}
答案 1 :(得分:0)
我无法通过简单的require命令安装Fuel;但是我确实通过执行以下命令成功安装了composer:
composer create-project fuel/fuel:dev-1.8/develop --prefer-source
我希望它能适用于你的情况。
答案 2 :(得分:0)
如果你想安装1.7 / master:
$ composer create-project fuel/fuel:dev-1.7/master ProjectName
如果你想安装1.8 / develop:
$ composer create-project fuel/fuel:dev-1.8/develop --prefer-source ProjectName