Composer dependency from own forked repository

前端 未结 1 947
长情又很酷
长情又很酷 2021-01-21 13:49

I have gitlab repository https://gitlab.com/ajkosh/yii2-admin and below is my composer.json:

{
    \"name\": \"haruatari/yii2-module-app\",
    \"de         


        
相关标签:
1条回答
  • 2021-01-21 13:59

    You're using incorrect package name. On resolving dependencies package name in URL is irrelevant, the only name what matters is package name in composer.json. So Composer reads composer.json from your forked repository, and finds name mdmsoft/yii2-admin, because you don't changed it after forking. There is no ajkosh/yii2-admin at all. You should either update package name in composer.json in your fork:

    {
        "name": "ajkosh/yii2-admin",
        "description": "RBAC Auth manager for Yii2 ",
        "keywords": ["yii", "admin", "auth", "rbac"],
        "type": "yii2-extension",
        ...
    

    Or use source package name in your require section:

    "require": {
        ...
        "mdmsoft/yii2-admin": "dev-master"
    },
    
    0 讨论(0)
提交回复
热议问题