Yii2作曲家更新错误authclient

Yii2 composer update error authclient

今天我对我的项目进行了作曲家更新。在更新 dektrium return 错误期间: 这是我的作曲家:

{
"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"
    }
}
}

错误是:

"Update failed ( Failed to execute git show-ref --head -d fatal: unexpected line in .git/packed-refs: ^4c5c383f577256d34cbc37ed26809a8ff109b2ec? ) Would you like to try reinstalling the package instead [yes]?

[RuntimeException] Failed to execute git show-ref --head -d
fatal: unexpected line in .git/packed-refs: ^4c5c383f577256d34cbc37ed26809a 8ff109b2ec? "

然后更新就停止了……我不知道该怎么办…… 我该如何解决这个错误?谢谢

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

中的以下版本
"dektrium/yii2-user" : "^0.9.12",

和运行作曲家更新

尝试将您的 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

试试这些步骤:

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