获取Composer以使用路径类型的存储库安装本地包

时间:2018-01-03 13:11:55

标签: yii2 composer-php yii2-extension

我有一个带有本地扩展名的yii2项目:

home/
   packages/
      yii2-unipv-gii/ < my extension
         composer.json (1)
   projects/
      my-project/ < my project
        composer.json (2)

我想在Yii2项目中安装扩展,使用path类型的存储库创建带扩展文件夹的符号链接。

我有composer.json(1)

{
"name": "unipvsag/yii2-unipv-gii",
"type": "yii2-extension",
"keywords": ["yii2","extension","unipv"],
"license": "MIT",
"minimum-stability": "dev",
"require": {
    "yiisoft/yii2": "~2.0.0"
},
"autoload": {
    "psr-4": {
        "unipvsag\\unipvgii\\": ""
    }
},
"extra": {
    "bootstrap": "unipvsag\\unipvgii\\Bootstrap"
}

}

和composer.json(2)

{
"name": "unipv/accesso-Programmato",
"type": "project",
"license": "BSD-3-Clause",
"minimum-stability": "dev",
"prefer-stable": true,
"repositories":[
    {
        "type": "path",
        "url": "../../packages/yii2-unipv-gii"
    }
],
"require": {
    ----other packages----
    "unipvsag/yii2-unipv-gii": "dev-master"     
},
"config": {
    "process-timeout": 1800
},
"extra": {
    "asset-installer-paths": {
        "npm-asset-library": "vendor/npm",
        "bower-asset-library": "vendor/bower"
    }
},
"scripts": {
}

}

问题出在composer update我收到此错误:

[InvalidArgumentException]
Unknown downloader type: . Available types: git, svn, fossil, hg, perforce, zip, rar, tar, gzip, xz, phar, file, path.

这是项目或扩展的问题吗?

0 个答案:

没有答案