Vote Details for "Requiring E_STRICT Compatibility for New PEAR Packages" by cellog

» Details
» Comment
This is a good thing.

My condition is that the section on version-based naming should be stricken from the proposal. In addition, the minimum supported PHP version must be the version at which E_STRICT is decided upon. There are changes in later PHP versions. This may mean 5.2.x. As long as the rules are flexible enough to adapt to the actual PHP release process, I am in favor of this proposal.

However, providing two packages that do the same thing and have version dependencies is unnecessary. Instead, specific files within the package should be used for PHP4-based versus PHP5-based functionality.

An example solution:

class Blah_Loader
function setVersion($phpversion = 5)
if ($phpversion >= 5) {
require_once 'Blah/PHP5.php';
} else {
require_once 'Blah/PHP4.php';

$a = new Blah_Loader;
$blah = new Blah(...)

Also possible is to simply use the <installconditions> tag and two <phprelease> tags. This provides the same package customized for different versions.

In other words, the PEAR installer already has plenty of capability to handle this issue, no need to pollute the package namespace.