Re: PHP_CompatInfo for PEAR packages
| From: | Brett Bieber | Date: | Mon, 03 Nov 2008 18:09:38 +0000 |
| Subject: | Re: PHP_CompatInfo for PEAR packages | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51007@lists.php.net to get a copy of this message | ||
On Fri, Oct 31, 2008 at 8:58 AM, till <till@php.net> wrote:
> Hey,
>
> does anyone know if there's a package that analyzes your code and
> tells you which pear packages it needs? Kind a like PHP_CompatInfo,
> but for PEAR dependencies? I'm looking for some inspiration so I can
> tame our ZendFramework install. ;-)
Hmm, not that I know of.
I built something to examine package.xml declared dependencies to
verify 'usage' within the package code - but this was a stupid simple
check which verified presence of the package name within the source
code of one of the package files.
Going the other way, or to do it right, you would need something much
more complex. Perhaps instrument the code, identify all the files
touched, then trace those files back to relevant packages?
A simple check for PEAR(1) packages built on checking the require_once
statements might be a start, but with an autoloader implementation it
would definitely be more difficult as the files used may change.
--
Brett Bieber