Re: apiVersion()

From: Date: Wed, 25 Feb 2004 15:41:28 +0000
Subject: Re: apiVersion()
References: 1 2  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-665@lists.php.net to get a copy of this message
Hi guys, Currently possible: package.xml: <file role="php" name="blah.php"> <replace from="@VER@" to="version" type="package-info" /> </file> blah.php: ... /** * @return array array('major' => major version, 'minor' => minor api version) */ function apiVersion() {
    $ver = explode('.', '@VER');
    return array('major' => array_shift($ver), 'minor' => implode('.', $ver));
} ... This code would work great for any version that has a period in it. As long as we require a period, we're OK. Of course, this will also mean that it is never possible to do a simple unzip and go. Greg Lukas Smith wrote:
Stefan Neufeind wrote:
On 24 Feb 2004 at 17:30, Lukas Smith wrote:
maybe someone wants to write up a proposal (this would include making sure it would get added to the manual in the end) about mandating (recommending?) a method to fetch the api version. Seeing the recent issue with DB including a bug fix for an old bug it should be possible not only to fetch the major but also the minor and patch number.
Did we already decide what should be a new "apiVersion"? I mean, if another function is added, that doesn't (necessarily) mean that old functionality is broken. And we already have the demand that if BC is broken a new major is required. So do you think it's useful/needed? And how to do it "right"?
2 reasons: 1) you want to easily determine of new functionality is available. in some cases this new functionality is "sugar" and therefore you dont require this funcationality, but you want to optionally make use of iz 2) there was a long standing bug for which you wrote a workaround for a certain set of versions. regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07


« previous php.pear.qa (#665) next »