[英]Loading a package from a VCS repository not working
I am trying to use a personal repository with modified code of someone elses repository on GitHub. 我正在尝试使用个人存储库以及GitHub上其他用户存储库的已修改代码。
I did exactly what getcomposer.org said by adding repositories
in composer.json
. 通过在composer.json
添加repositories
,我完全做到了getcomposer.org所说的。
Whenever I composer update
though, I check the code and it's always the original one instead of mine. 不过,无论何时我composer update
,我都会检查代码,它始终是原始代码,而不是我的代码。
This is my composer.json
. 这是我的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"
},
[...]
}
Solved by branching the code in a branch that is not master
and by adding dev-
followed by the branch name in the composer.json
(in my case bugfix
), like this: 通过在非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"
},
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.