Dependency too high on PEAR package for PHP core Library

8 messages Options
Embed this post
Permalink
Laurent Laville () Dependency too high on PEAR package for PHP core Library
Reply Threaded More More options
Print post
Permalink
Hi Christoph,

I've just finished today a draft for a proposal about integration to FirePHP into PEAR as a new driver to PEAR::Log package, and I received an interresting comment about PHP dependency.

In PEAR package you've set PHP dependency minimum to version 5.2.5

But there is no reason to set it too high (minimum required is 5.0.0). Of course, as there are lot of problems with PHP 5.0.0 thru 5.1.x , I understand your point of view.

But a minimum to PHP 5.2.0 is enough (to avoid PHP version problem) and allow more users to use your PEAR package version.

This feedback was suggest to me by Ken Guest (thanks to him)

Regards
Laurent Laville

http://pear.php.net/user/farell
Christoph Dorn () Re: Dependency too high on PEAR package for PHP core Library
Reply Threaded More More options
Print post
Permalink
Thanks for the feedback and your PEAR proposal!

I will be dropping the min requirement to 5.2.0 for the 0.2 release.

In regards to the PEAR proposal. Would you be open to adding me as a co-author? There are a number of changes to your draft I would recommend to future-proof the implementation. I also want to ensure the package will continue to be maintained and I am happy to keep it updated should you not be available.

Do you think it would make sense to propose a Wildfire and FirePHP component as well so there is no external dependency on the FirePHPCore package from pear.firephp.org?
Laurent Laville () Re: Dependency too high on PEAR package for PHP core Library
Reply Threaded More More options
Print post
Permalink
Thanks to gave me a such welcome to my proposal and about your PEAR package.

Of course, I'm pleased to add you as a co-author to my PEAR::Log driver proposal. And it's already done on the draft http://pear.php.net/pepr/pepr-proposal-show.php?id=578

About your last question, could you explain me more on your idea . Either I don't really understand (sorry, but I'm french) or I don't see why it could be a problem to add an optional dependency from PEAR::Log to FirePHPCore (your PEAR package version).
Christoph Dorn () Re: Dependency too high on PEAR package for PHP core Library
Reply Threaded More More options
Print post
Permalink
The FirePHPCore package resides on it's own channel at pear.firephp.org
Would it make sense to move it to pear.php.net to simplify install or is it common practice to have some PEAR packages from pear.php.net be dependent on packages from external channels?
Laurent Laville () Re: Dependency too high on PEAR package for PHP core Library
Reply Threaded More More options
Print post
Permalink
It's very simple to have package that depends of another in its own channel like your (pear.firephp.org)

Here is a bit of an example to build / prepare a package (with PEAR_PackageFileManager, if you used it)
and add an external dependency to a resource in another channel

Suppose we have to build the PEAR::Log package, and add the firephp driver

<?php
require_once 'PEAR/PackageFileManager2.php';

$p2 = new PEAR_PackageFileManager2();
...
$p2->addPackageDepWithChannel('optional', 'FirePHPCore', 'pear.firephp.org', '0.1.2');

Will produce something like in package XML 2.0

<dependencies>
 <required>
<!-- ... -->
 </required>
 <optional>
  <package>
   <name>FirePHPCore</name>
   <channel>pear.firephp.org</channel>
   <min>0.1.2</min>
  </package>
 </optional>
</dependencies>

Laurent Laville () Re: Dependency too high on PEAR package for PHP core Library
Reply Threaded More More options
Print post
Permalink
Forgot to simple reply to your question : keep your package in your own channel; no need to move to PEAR
Christoph Dorn () Re: Dependency too high on PEAR package for PHP core Library
Reply Threaded More More options
Print post
Permalink
Great.

How/where should we discuss your proposal? We can do it here? By Email?
Laurent Laville () Re: Dependency too high on PEAR package for PHP core Library
Reply Threaded More More options
Print post
Permalink
By Email is fine for me !
My mail address is : pear <at> laurent-laville <dot> org