Validate a package-style dependency. Validation is performed in this sequence:
If the dependency package provides an extension through the <providesextension> tag, then see if it passes the extension validation test first and return if so.
If the list of packages to be installed contains a match for the dependency, use that to validate the dependency and return.
If the dependency package is already installed, make sure the installed version passes the conditions.
At this point, the dependency has failed. If the dependency is required, return a PEAR_Error containing the failure error message, otherwise return an array containing the error message.
$depdependency array as defined by package.xml 2.0
$requiredwhether this is a required or optional dependency
$paramsarray of PEAR_Downloader_Package objects representing packages to be downloaded that can be used to validate dependencies
$depv1if TRUE, then deps on pear.php.net that fail will also check against pecl.php.net packages to accomodate extensions that have moved to pecl.php.net from pear.php.net