Code:
+ cat .config/composer/config.json
{
"repositories": {
"b": {
"type": "path",
"url": "$PWD/b"
},
"c": {
"type": "path",
"url": "$PWD/c"
}
}
}
+ cat a/composer.json
{
"require": {
"test/b": "^1.0"
}
}
+ cat b/composer.json
{
"name": "test/b",
"version": "1",
"require": {
"test/c": "^1.0"
}
}
+ cat c/composer.json
{
"name": "test/c",
"version": "1"
}
As you can see, only the test/b package requires the test/c package.
However, as you will see below, the vendor/test/c directory I find it both under directory b, and under the directory a.
Code:
+ composer update --working-dir=b
+ composer update --working-dir=a
+ find | grep vendor/test/c
./b/vendor/test/c
./a/vendor/test/c
Can the directory a contains vendor/test/c be prevented?
Last edited: