Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #18977

composer: dependences and dependents

From SupaPlex <old@gamer.s>
Newsgroups comp.lang.php
Subject composer: dependences and dependents
Date 2022-06-22 11:08 +0200
Organization Aioe.org NNTP Server
Message-ID <t8um63$n4e$1@gioia.aioe.org> (permalink)

Show all headers | View raw


$ cat .composer/config.json
{
     "repositories": {
         "a": {
             "type": "path",
             "url": "repo/a"
         },
         "b": {
             "type": "path",
             "url": "repo/b"
         },
         "c": {
             "type": "path",
             "url": "repo/c"
         }
     }
}
$ cat repo/a/composer.json
{
     "name": "my/a",
     "require": {
         "my/b": "dev-master"
     }
}
$ cat repo/b/composer.json
{
     "name": "my/b",
     "require": {
         "my/c": "dev-master"
     }
}
$ cat repo/c/composer.json
{
     "name": "my/c"
}

How do you see

my/a requires my/b
my/b requires my/c

But I wanted to know if there is a way to view *quickly* the whole 
structure of dependences.
Above all, I would like to know the *dependents*.

I tried like this

$ COMPOSER_HOME=.composer composer show -a my/b
No composer.json found in the current directory, showing available 
packages from a, b, c, packagist.org
name     : my/b
descrip. :
keywords :
versions : dev-master
type     : library
homepage :
source   : []
dist     : [path] repo/b 6de0f9e677dcab7051f94dbbf05893d0165bb826
names    : my/b

requires
my/c dev-master

In summary

$ COMPOSER_HOME=.composer composer show -a my/b \
   | grep my/
No composer.json found in the current directory, showing available 
packages from a, b, c, packagist.org
name     : my/b
names    : my/b
my/c dev-master

It tell me that

my/b requires my/c

but it doesn't tell me that

my/b is required from my/a (this is the thing that interests me most).

For example, if I have to remove a package (obsolete package), how can I 
verify that it does not have dependents?

Back to comp.lang.php | Previous | NextNext in thread | Find similar | Unroll thread


Thread

composer: dependences and dependents SupaPlex <old@gamer.s> - 2022-06-22 11:08 +0200
  Re: composer: dependences and dependents Arno Welzel <usenet@arnowelzel.de> - 2022-06-22 14:33 +0200
    Re: composer: dependences and dependents SupaPlex <old@gamer.s> - 2022-06-22 15:12 +0200
      Re: composer: dependences and dependents Arno Welzel <usenet@arnowelzel.de> - 2022-06-22 16:07 +0200
        Re: composer: dependences and dependents SupaPlex <old@gamer.s> - 2022-06-22 16:35 +0200
          Re: composer: dependences and dependents Arno Welzel <usenet@arnowelzel.de> - 2022-06-22 16:37 +0200
            Re: composer: dependences and dependents SupaPlex <old@gamer.s> - 2022-06-22 17:13 +0200
              Re: composer: dependences and dependents Arno Welzel <usenet@arnowelzel.de> - 2022-06-24 13:31 +0200

csiph-web