Json 从VCS存储库加载包不起作用
我正在尝试使用一个个人存储库,其中包含GitHub上其他人存储库的修改代码 我就是这么做的,在Json 从VCS存储库加载包不起作用,json,git,composer-php,Json,Git,Composer Php,我正在尝试使用一个个人存储库,其中包含GitHub上其他人存储库的修改代码 我就是这么做的,在composer.json中添加了repositories { [...] "repositories": [ { "type": "vcs", "url": "https://github.com/GiampaoloFalqui/php-phantomjs" }, {
composer.json
中添加了repositories
{
[...]
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GiampaoloFalqui/php-phantomjs"
},
{
"type": "vcs",
"url": "https://github.com/GiampaoloFalqui/tesseract-ocr-for-php"
}
],
"require": {
"laravel/framework": "4.2.*",
"codesleeve/asset-pipeline": "dev-master",
"jonnyw/php-phantomjs": "3.*",
"thiagoalessio/tesseract_ocr": ">= 0.2.0"
},
[...]
}
但是,每当我更新composer时,我都会检查代码,它始终是原始代码,而不是我的
这是我的composer.json
{
[...]
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GiampaoloFalqui/php-phantomjs"
},
{
"type": "vcs",
"url": "https://github.com/GiampaoloFalqui/tesseract-ocr-for-php"
}
],
"require": {
"laravel/framework": "4.2.*",
"codesleeve/asset-pipeline": "dev-master",
"jonnyw/php-phantomjs": "3.*",
"thiagoalessio/tesseract_ocr": ">= 0.2.0"
},
[...]
}
通过将代码分支到非
master
的分支中,并在composer.json
中添加dev-
,后跟分支名称(在我的示例中是bugfix
),如下所示:
"require": {
"laravel/framework": "4.2.*",
"codesleeve/asset-pipeline": "dev-master",
"jonnyw/php-phantomjs": "dev-bugfix",
"thiagoalessio/tesseract_ocr": "dev-bugfix"
},