I've created my yii2 extension. I keep it on my private git server. I managed the extension to be downloaded through composer using following code:
"repositories": [
{
"type": "package",
"package": {
"name": "author/yii2-user",
"version": "dev-master",
"source": {
"url": "ssh://[email protected]/srv/git/user.git",
"type": "git",
"reference": "origin/master"
}
}
}
],
and "author/yii2-user": "*",
in require
section.
It all works fine but there is one problem. After downloading extension, composer should add it to the yiisoft\extension.php
file but it's not being added.
In my extension I have composer.json file like this:
{
"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": "[email protected]"
}
],
"require": {
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*"
},
"autoload": {
"psr-4": {
"author\\user\\": ""
}
}
}
I'm trying to find a solution but it's a hard one.