Yii2作曲家更新错误authclient

时间:2018-03-29 13:43:33

标签: yii2 composer-php yii2-user yii2-authclient

今天我在我的项目上做了一个作曲家更新。在更新dektrium返回错误期间: 这是我的作曲家:

{
"name": "my company",
"description": "my company website",
"keywords": ["computers", "advanced", "web design"],
"homepage": "here is a link",
"type": "project",
"license": "BSD-3-Clause",
"support": {
    "issues": "https://github.com/yiisoft/yii2/issues?state=open",
    "forum": "http://www.yiiframework.com/forum/",
    "wiki": "http://www.yiiframework.com/wiki/",
    "irc": "irc://irc.freenode.net/yii",
    "source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "stable",
"require": {
    "php": ">=5.4.0",
    "yiisoft/yii2": ">=2.0.6",
    "yiisoft/yii2-bootstrap": "*",
    "yiisoft/yii2-swiftmailer": "*",
    "kartik-v/yii2-widget-fileinput": "@dev",
    "omgdef/yii2-multilingual-behavior": "~2.0",
    "yiisoft/yii2-imagine": "~2.0.0",
    "dektrium/yii2-user": "0.9.*@dev",
    "kartik-v/yii2-widget-select2": "@dev",
    "dektrium/yii2-rbac": "dev-master",
    "geoip2/geoip2" : "~2.0",
    "maxmind-db/reader" : "~1.0",
    "skeeks/yii2-mobile-detect": "*",
    "kartik-v/yii2-widget-alert": "*",
    "jlorente/yii2-widget-remainingcharacters": "*",
    "himiklab/yii2-recaptcha-widget": "*",
    "kartik-v/yii2-export": "^1.2"
},
"require-dev": {
    "yiisoft/yii2-codeception": "*",
    "yiisoft/yii2-debug": "*",
    "yiisoft/yii2-gii": "*",
    "yiisoft/yii2-faker": "*"
},
"config": {
    "process-timeout": 1800
},
"extra": {
    "asset-installer-paths": {
        "npm-asset-library": "vendor/npm",
        "bower-asset-library": "vendor/bower"
    }
}
}

错误是:

  

"更新失败(无法执行git show-ref --head -d致命错误:   .git / packed-refs中的意外行:   ^ 4c5c383f577256d34cbc37ed26809a8ff109b2ec? )       您是否想尝试重新安装软件包[是]?

     

[RuntimeException]无法执行git show-ref --head -d
  致命:.git / packed-refs中的意外行:   ^ 4c5c383f577256d34cbc37ed26809a 8ff109b2ec? "

PyPI search for „pyqt“ 之后更新停止了......我不知道该怎么办...... 我该如何解决这个错误?感谢。

2 个答案:

答案 0 :(得分:1)

尝试以下步骤:

  1. 从项目中删除vendor目录。
  2. 运行composer clear-cache命令。
  3. 再次运行composer install

答案 1 :(得分:0)

dektrium/yii2-user 的版本更改为composer.json

中的以下内容
"dektrium/yii2-user" : "^0.9.12",

并运行composer update

尝试将 composer.json 与以下

相匹配
    "minimum-stability" : "dev",
    "prefer-stable" : true,
    "require" : {
        "php" : ">=5.4.0",
        "yiisoft/yii2" : "*",
        "yiisoft/yii2-bootstrap" : "~2.0.0",
        "yiisoft/yii2-swiftmailer" : "~2.0.0",
        "dektrium/yii2-user" : "^0.9.12",
        "dektrium/yii2-rbac" : "1.0.0-alpha@dev",
    },
    "require-dev" : {
        "yiisoft/yii2-debug" : "~2.0.0",
        "yiisoft/yii2-gii" : "~2.0.0",
        "yiisoft/yii2-faker" : "~2.0.0",
        "codeception/base" : "^2.2.3",
        "codeception/verify" : "~0.3.1"
    },
    "config" : {
        "process-timeout" : 1800,
        "fxp-asset" : {
            "installer-paths" : {
                "npm-asset-library" : "vendor/npm",
                "bower-asset-library" : "vendor/bower"
            }
        }
    },
    "scripts" : {
        "post-install-cmd" : "php init --env=Development --overwrite=n"
    }

注意:我使用过 config.fxp-asset.installer-paths 而不是 extra.asset-installer-paths