Re: Request: add betterStates() to PEAR_Common class
| From: | Tomas V.V.Cox | Date: | Wed, 27 Aug 2003 17:03:12 +0000 |
| Subject: | Re: Request: add betterStates() to PEAR_Common class | ||
| References: | 1 | Groups: | php.pear.dev php.pear.webmaster |
| Request: | Send a blank email to pear-dev+get-20657@lists.php.net to get a copy of this message | ||
On Friday, August 22, 2003 8:49, Greg Beaver wrote:
> Hi,
> In order to implement automatic dependency resolution, it looks like I
> will need a copy of the betterStates() method from pearweb's
> include/pear-database.php. Is there any objection to copying this
> method verbatim to the PEAR/Common.php PEAR_Common class? It would
> obviously require updating any time the release states are changed, but
> the states seem pretty stable.
> source:
> /**
> * ???
> *
> * @param string Release state
> * @return boolean
> */
> function betterStates($state)
> {
> static $states = array('devel', 'snapshot', 'alpha',
> 'beta',
> 'stable');
> $i = array_search($state, $states);
> if ($i === false) {
> return false;
> }
> return array_slice($states, $i + 1);
> }
> I think I can improve on the documentation a bit too ;)
I see no problem here. Just one thing: 'devel' is a distribution
targeted to developers which has been prepared and perhaps tested for
them. So I guess it's a better state than just a snapshot of the CVS
code.
--
Tomas V.V.Cox mailto:cox@idecnet.com