Answer the question
In order to leave comments, you need to log in
How to use fork in composer in yii2 project?
Good day! My actions I create a fork of the repository https://github.com/yiisoft/yii2 I create a new branch called myfix I make fixes, then I commit and push the branches, I add my repository to the composer.json file in the project
"repositories": [
{
"type": "git",
"url": "https://github.com/lxShaDoWxl/yii2.git"
}
],
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "dev-myfix as 2.0.7",
...........
},
Problem 1
- The requested package yiisoft/yii2 dev-myfix as 2.0.7 could not be found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Answer the question
In order to leave comments, you need to log in
Found a mistake, I should have fork done https://github.com/yiisoft/yii2-framework and not https://github.com/yiisoft/yii2
Made a fork recreated tag 2.0.7 and did a push then cleared the composer cache and did an update
1) https://github.com/yiisoft/yii2 can be connected to the project, but the package name is "yiisoft/yii2-dev"
https://github.com/yiisoft/yii2/blob/master/compos...
2 ) "dev-myfix" specifies the name of the branch. It used to work that way, but recently checked it doesn't work anymore. Therefore, you can download "dev-master" and then go to the 'vendor/yiisoft/yii2-dev' folder and
go to the desired branch
"require": {
"yiisoft/yii2-dev": "dev-myfix"
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question