On Greg Breaver's blog today, he has a new post that proposes the "best way to bundle dependencies in an application".
This leads to the inevitable problem of extreme difficulty updating the dependencies. Until now, the only other alternative was to simply use PEAR's package.xml to specify dependencies on the packages.
There is, however, a very elegant solution that combines the strengths of both.
For a while, there has been an ongoing debate over the best way to bundle dependencies with a PHP application. Traditionally, dependencies are simply included in the source code. phpDocumentor does this with packages like HTML_TreeMenu (from pear.php.net), Cezpdf, and Smarty.
The new option that he states is the use of the new "config-create" command in PEAR to generate a PEAR installation and then use the PakcageFileManager library to bundle in the necessary dependencies.
Then, either through a plugin in the application or through the actual pear command, the end-user could upgrade the dependencies for the application without needing to upgrade the application itself.
Sounds pretty sweet to me....




