[PEPr] +1 for RFC::Requiring E_STRICT Compatibility for New PEAR Packages
| From: | Greg Beaver | Date: | Wed, 06 Sep 2006 18:25:13 +0000 |
| Subject: | [PEPr] +1 for RFC::Requiring E_STRICT Compatibility for New PEAR Packages | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-43901@lists.php.net to get a copy of this message | ||
Greg Beaver (http://pear.php.net/user/cellog) has voted +1 on the proposal for RFC::Requiring
E_STRICT Compatibility for New PEAR Packages.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=419
Vote information:
http://pear.php.net/pepr/pepr-vote-show.php?id=419&handle=cellog
This vote is conditional. The condition is:
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;
$a->setVersion(4);
$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.
--
Sent by PEPr, the automatic proposal system at http://pear.php.net