Composer不会加载自定义存储库

时间:2019-11-19 08:42:33

标签: git composer-php

我在github上创建了三个耦合的存储库,以对其中一个进行更改,并在PR未获批准的情况下立即使用这些更改。这些仓库是:

async-soap-guzzlesoap-http-binding中,我将存储库添加到了composer.json(并将dev-master设置为要使用的版本),所以我做了{{1} }在我的项目中。现在,当我在项目中使用composer.json时,它将加载composer update主仓库中master的最后一次提交:(请任何人,请解释一下为什么这样做。

这是我的async-soap-guzzle

composer.json

每次运行{ "repositories": [ { "name": "arrilot/bitrix-migrations", "type": "vcs", "url": "https://github.com/viktorprogger/bitrix-migrations" }, { "name": "meng-tian/async-soap-guzzle", "type": "vcs", "url": "https://github.com/viktorprogger/async-soap-guzzle" }, { "name": "meng-tian/async-soap-guzzle", "type": "vcs", "url": "https://github.com/viktorprogger/soap-http-binding" }, { "name": "meng-tian/async-soap-guzzle", "type": "vcs", "url": "https://github.com/viktorprogger/php-soap-interpreter" } ], "require": { "php": "^5.6", "ext-pdo": "*", "ext-dom": "*", "ext-curl": "*", "ext-libxml": "*", "ext-simplexml": "*", "ext-json": "*", "ext-soap": "*", "arrilot/bitrix-migrations": "dev-master", "shuchkin/simplexlsx": "^0.8", "monolog/monolog": "^1.25", "guzzlehttp/guzzle": "^6.4", "meng-tian/async-soap-guzzle": "dev-master" } } 时都说composer updateUpdating meng-tian/async-soap-guzzle dev-master (dbbc9b2 => 15ec881): Checking out 15ec881a6e是我的仓库的dbbc9b2 master,而HEAD是原始仓库的15ec881 master,实际上每次都被检出。

这是我的HEAD关于composer.lock回购的一个区块:

async-soap-guzzle

但是 "name": "meng-tian/async-soap-guzzle", "version": "dev-master", "source": { "type": "git", "url": "https://github.com/viktorprogger/async-soap-guzzle.git", "reference": "dbbc9b2e0a0d3f8c201b347c3b2a38f28fe41f5e" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/viktorprogger/async-soap-guzzle/zipball/dbbc9b2e0a0d3f8c201b347c3b2a38f28fe41f5e", "reference": "dbbc9b2e0a0d3f8c201b347c3b2a38f28fe41f5e", "shasum": "" }, 目录中的代码对应于原始存储库(https://api.github.com/repos/meng-tian/async-soap-guzzle)中的vendor

1 个答案:

答案 0 :(得分:0)

Composer仅考虑来自根composer.json的自定义存储库,这意味着,您需要将所有三个自定义存储库添加到项目composer.json中,以便Composer可以将forks加载到项目中。

此处有更多详细信息:https://getcomposer.org/doc/04-schema.md#repositories