Answer the question
In order to leave comments, you need to log in
How to implement mutual dependency in composer?
There are two packages, they depend on each other.
composer.json for Package1:
{
"name": "my/Package1",
...
"require": {
"my/Package2": "master"
},
"repositories":[
{
"type": "vcs",
"url": "https://github.com/my/Package2"
}
]
...
}
{
"name": "my/Package2",
...
"require": {
"my/Package1": "master"
},
"repositories":[
{
"type": "vcs",
"url": "https://github.com/my/Package1"
}
]
...
}
Answer the question
In order to leave comments, you need to log in
And yet something is wrong with the architecture. The question sounds something like this: to get an egg - you need a chicken, to get a chicken - you need an egg, how to get both a chicken and an egg at the same time?
Unit tests for that and unit (modular) that test one unit - in isolation!
There are two ways out of the situation:
1. Move common things from both packages to the third one, and include it as dependencies of the first two.
2. Remove the second one from the dependencies of one of the packages. That. both packages will still be updated.
3. Official solutions: Why can't Composer load repositories recursively?
If two packages are interdependent, then why are there two and not one?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question