Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Json 从VCS存储库加载包不起作用_Json_Git_Composer Php - Fatal编程技术网

Json 从VCS存储库加载包不起作用

Json 从VCS存储库加载包不起作用,json,git,composer-php,Json,Git,Composer Php,我正在尝试使用一个个人存储库,其中包含GitHub上其他人存储库的修改代码 我就是这么做的,在composer.json中添加了repositories { [...] "repositories": [ { "type": "vcs", "url": "https://github.com/GiampaoloFalqui/php-phantomjs" }, {

我正在尝试使用一个个人存储库,其中包含GitHub上其他人存储库的修改代码

我就是这么做的,在
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"
},