我想更新GitHub中的回购程序,使其与ZF3兼容,我已经将存储库分叉到我的帐户,并进行了一些更新。
这是我的叉子:https://github.com/chateaux/zf-oauth2-doctrine
现在,为了将其包含在我的代码库中,我使用的是Composer:
{
"name": "My Project",
"description": "",
"license": "PRIVATE - ",
"keywords": [
""
],
"homepage": "",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/chateaux/zf-oauth2-doctrine"
}
],
"require": {
"php": ">=5.4",
"zendframework/zendframework": "^2.4",
"doctrine/doctrine-orm-module": "~0.8",
"doctrine/orm": "^2.4",
"gedmo/doctrine-extensions": "^2.4",
"zf-commons/zfc-rbac":"^2.5",
"rwoverdijk/assetmanager": "^1.4",
"zfcampus/zf-apigility": "^1.0",
"zfr/zfr-cors": "^1.2",
"hounddog/doctrine-data-fixture-module": "^0.0.4",
"zfcampus/zf-oauth2-client": "dev-master",
"api-skeletons/zf-oauth2-doctrine": "dev-master",
"api-skeletons/zf-oauth2-doctrine-console": "^1.1",
"chateaux/toolbox" : "dev-master"
},
"require-dev": {
"zfcampus/zf-apigility-admin": "~1.0",
"zfcampus/zf-development-mode": "~2.0",
"zendframework/zend-developer-tools": "dev-master"
}
}但是,当我运行一个编写器更新时,它似乎是从缓存中提取出来的,所以我没有得到更新的代码库:
$ php composer.phar update
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Warning: This development build of composer is over 60 days old. It is recommended to update it by running "composer.phar self-update" to get the latest version.
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing zfcampus/zf-oauth2-doctrine (1.0.3)
Loading from cache我做错了什么?
发布于 2016-04-18 14:37:49
您应该将存储库的自定义分支添加到composer.json文件中的存储库数组中,并添加一个类型字段git,然后指向您希望与dev-[branchname]一起使用的分支(例如,patch-4变成dev-patch4):
{
"name": "My ZF2 application",
"repositories": [
{
"type": "git",
"url": "https://github.com/chateaux/zf-oauth2-doctrine.git"
},
],
"require": {
...
"zfcampus/zf-oauth2-doctrine": "dev-patch-4",
...
}
}确保patch-4是自定义存储库中的现有分支。
您可以找到有关此解决方案关于谷歌的第一次攻击的更多信息。
https://stackoverflow.com/questions/36693045
复制相似问题