I state that my question is not mainly about php, but composer.[...]
Here's the question ...
+ cat .config/composer/config.json
+ cat a/composer.json[...]
+ cat b/composer.json[...]
+ cat c/composer.json[...]
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*.
-----BEGIN PGP MESSAGE-----
Composer is not intended to be used this way. Usually you have exactly
*one* composer.json in your project and not multiple ones.
Il 13/11/22 14:56, Arno Welzel ha scritto:
Composer is not intended to be used this way. Usually you have exactly
*one* composer.json in your project and not multiple ones.
A, B, and C would be three distinct projects (packages) IHMO, each with
their respective composer.json
"local" composer.json
Il 15/11/22 12:51, Arno Welzel ha scritto:
"local" composer.json
????
paul, 2022-11-15 13:19:
Il 15/11/22 12:51, Arno Welzel ha scritto:
"local" composer.json
????
From your original post:
+ cat a/composer.json
+ cat b/composer.json
+ cat c/composer.json
So either you have three separate projects "a", "b" and "c" which each
use Composer *or* you have one project with the packages "a", "b" and
"c" - but then you should also only have *one* composer.json for your
project and treat a, b and c just as parts of your project.
+ cat b/composer.json
{
"name": "test/b",
"version": "1",
"require": {
"test/c": "^1.0"
}
}
+ find | grep vendor/test/c
./b/vendor/test/c
./a/vendor/test/c
...
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 465 |
Nodes: | 16 (2 / 14) |
Uptime: | 07:18:10 |
Calls: | 9,391 |
Files: | 13,566 |
Messages: | 6,096,170 |