我使用Composer从BitBucket加载我的私人远程存储库:
{
"require": {
"pico/pico-core": "dev-dev"
},
"repositories": [
{
"type": "git",
"url": "https://git@bitbucket.org/picodevelopmentteam/php-server-core.git"
}
],
"autoload": {
"psr-0": {
"PicoApi\\": ""
}
},
"minimum-stability": "dev"
}
我的pico-core composer.json看起来像这样:
{
"name": "pico/pico-core",
"require": {
"facebook/php-sdk": "@stable",
"everyman/neo4jphp": "dev-master",
"predis/predis": "1.0.1",
"aws/aws-sdk-php": "2.*"
},
"autoload": {
"psr-0": {
"PicoCore\\": ""
}
}
}
我收到以下错误:
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package pico/pico-core could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
设置包名称在哪里?
更新 我也得到了这个错误:
Reading composer.json of https://git@bitbucket.org/vendor/repository.git (FixingIssues)
我确实有一个FixingIssues分支,但那不是我告诉他去的分支(我将dev-dev定义为正确的分支)
答案 0 :(得分:2)
您所需的版本几乎肯定不正确,因为minimum-stability
dev
(这很少是一个好主意)。
...
"require": {
"pico/pico-core": "dev-dev" //ensure the dev branch actually exists
},
...
这是作曲家稳定性标志的有用指南:https://igor.io/2013/02/07/composer-stability-flags.html