PEAR_DependencyDB::getDependentPackageDependencies() – Get a list of the actual dependencies of installed packages that depend on a package.


require_once '/DependencyDB.php';

array|false PEAR_DependencyDB::getDependentPackageDependencies ( PEAR_PackageFile_v1|PEAR_PackageFile_v2|array &$pkg )


This returns the complete tree of extended dependencies of a single installed package.

For instance, a real-world example. package SOAP depends on Mail_Mime, HTTP_Request, Net_URL, Net_DIME. package HTTP_Request depends on Net_URL, Net_Socket. This method will return an array similar to:

    '' =>
            'mail_mime' =>
                array('name' => 'Mail_Mime',
                      'channel' => ''),
            'http_request' =>
                array('name' => 'HTTP_Request',
                      'channel' => ''),
            'net_url' =>
                array('name' => 'Net_URL',
                      'channel' => '',
                      'min' => '1.0.12'),
            'net_dime' =>
                array('name' => 'Net_DIME',
                      'channel' => ''),
            'net_socket' =>
                array('name' => 'Net_Socket',
                      'channel' => ''),

Note that this should not be relied upon for exact dependencies. In the example above, the returned dependency will be that of HTTP_Request upon Net_URL, which is stricter than SOAP's dependency upon Net_URL. In other words, if there are two similar dependencies, the last one encountered will be returned.


PEAR_PackageFile_v1|PEAR_PackageFile_v2|array &$pkg

This parameter, if an array, should be in format:

  'package' => 'packagename',
  'channel' => 'channelname'


throws no exceptions thrown


This function can not be called statically.

Get a list of dependencies of this installed package (Previous) Get a list of installed packages that depend on this package (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.