• Re: [composer] duplicate vendor

    From Arno Welzel@usenet@arnowelzel.de to comp.lang.php on Tue Nov 15 14:05:03 2022
    From Newsgroup: comp.lang.php

    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.
    --
    Arno Welzel
    https://arnowelzel.de

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From paul@sk@i.p to comp.lang.php on Tue Nov 15 15:30:02 2022
    From Newsgroup: comp.lang.php

    Il 15/11/22 14:05, Arno Welzel ha scritto:
    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.

    Bah... it will be like you say... maybe...
    Anyway look a little what I did


    Il 12/11/22 11:38, paul ha scritto:
    + cat b/composer.json
    {
    "name": "test/b",
    "version": "1",
    "require": {
    "test/c": "^1.0"
    }
    }

    $ cat new-composer.json
    {
    "config": {
    "vendor-dir": "internal-vendor"
    },
    "name": "test/b",
    "version": "1",
    "require": {
    "test/c": "^1.0"
    }
    }
    $ mv new-composer.json b/composer.json
    $ find b -name *vendor*
    b/vendor
    $ composer update --working-dir=b
    $ find b -name *vendor*
    b/vendor
    b/internal-vendor
    $ rm -rf b/vendor
    $ find b -name *vendor*
    b/internal-vendor

    OK!!!!!!

    Il 12/11/22 11:38, paul ha scritto:
    + find | grep vendor/test/c
    ./b/vendor/test/c
    ./a/vendor/test/c

    $ find | grep vendor/test/c
    ./b/internal-vendor/test/c
    ./a/vendor/test/c
    $ find | grep vendor/test/c | grep -v internal-vendor
    ./a/vendor/test/c

    It seems that it is fine.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From paul@sk@i.p to comp.lang.php on Mon Nov 21 09:56:59 2022
    From Newsgroup: comp.lang.php

    Il 15/11/22 15:30, paul ha scritto:
    ...

    Any comments?
    Like, do not like?
    --- Synchronet 3.21d-Linux NewsLink 1.2