Jeni Vasileva
Jeni Vasileva

Reputation: 788

Yii2 composer update error authclient

Today i did a composer update on my project. During updating dektrium return error : here is my composer:

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

The error is :

"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? "

enter image description here and after that the updating is stop ... i dont know what to do ... How can I fix this error? Thanks.

Upvotes: 2

Views: 450

Answers (2)

rob006
rob006

Reputation: 22144

Try these steps:

  1. Delete vendor directory from your project.
  2. Run composer clear-cache command.
  3. Run composer install again.

Upvotes: 1

Muhammad Omer Aslam
Muhammad Omer Aslam

Reputation: 23740

Change your version for dektrium/yii2-user to the following in composer.json

"dektrium/yii2-user" : "^0.9.12",

and run composer update

try matching your composer.json to the following

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

Notice : that i have used config.fxp-asset.installer-paths rather than extra.asset-installer-paths that has been deprecated.

Upvotes: 0

Related Questions