I created the yii2 extension. I save it on my personal git server. I managed to download the extension through the composer using the following code:
"repositories": [ { "type": "package", "package": { "name": "author/yii2-user", "version": "dev-master", "source": { "url": "ssh:// git@my.server.pl /srv/git/user.git", "type": "git", "reference": "origin/master" } } } ],
and "author/yii2-user": "*", in the require section. Everything works fine, but there is one problem. After downloading the extension, the composer should add it to the yiisoft\extension.php file, but it is not added.
In my extension, I have a composer.json file as follows:
{ "name": "author/yii2-user", "description": "Auth and user manager for our apps", "keywords": ["yii", "admin", "auth"], "type": "yii2-extension", "support": { "issues": "", "source": "" }, "authors": [ { "name": "j2", "email": " j2@j2.j2 " } ], "require": { "yiisoft/yii2": "*", "yiisoft/yii2-bootstrap": "*" }, "autoload": { "psr-4": { "author\\user\\": "" } }
}
I am trying to find a solution, but it is difficult.