Re: [PHP-DEV] extension/module versioning

2001-05-06 Thread Wez Furlong

On 2001-05-06 02:06:42, [EMAIL PROTECTED] wrote:
 what are the chances of having a function call for every extension that
 returns the version? this would be extremely useful for determining
 whether the correct version is installed, rather than checking to see
 if the function_exists().
 $version_id = xml_version();

As someone else suggested, get_extension_version('xml') is probably the
better way to implement this.

The zend module structure could very easily be adapted to retain the
version number.

Being lazy, I would like to see it bump automatically, but since it would
need to change each time a parameter/function is added/removed that's
difficult :-)

--Wez.


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] extension/module versioning

2001-05-06 Thread Stig Sæther Bakken

[[EMAIL PROTECTED]]
 dev team,
 
 what are the chances of having a function call for every extension that
 returns the version? this would be extremely useful for determining
 whether the correct version is installed, rather than checking to see
 if the function_exists().
 
 eg.
 
 $version_id = xml_version();
 
 or
 
 $version_id = ibase_version();
 
 thanks for your attention,

I second this, although I really think a constant or maybe _one_
function for checking any extension's version would be best.

Also, I think we need some guidelines for version numbering, so
different extensions don't have vastly different ideas of what it
means when the major version changes.

Here's a suggestion from PEAR:

-- snip --

We encourage maintainers to use one of the following version numbering
schemes:

MMDD( = year, MM = month, DD = day)
V[{a,b}N]   (V = version) [ alpha or beta release N ]
V.R[{a,b}N] (R = release)
V.R.P[{a,b}N]   (P = patchlevel)

PEAR tools follow these rules to compare versions:

For MMDD, V, R, P and N, a higher number indicates a more recent
release.  Any beta of a release is considered newer than an alpha of
the same release.

When comparing V with V.N, V.N is considered newer if the version part
of V.N is greather than or equal to the version part of V.  The same
logic applies to V.N.P vs. V.N.

Releases with lots of known bugs, potential API changes etc. are
typically alpha releases.  Beta releases are when the risk of API
changes is minimal and you believe most bugs are found.

Between patchlevels, there should be no or very limited, and
compatible, API changes.  Between releases, API changes should be
compatible.  Between versions it's ok to break the API.

An API consists of names of classes, functions, documented globals,
which parameters are accepted by functions/methods and their
semantics/behaviour.

-- snip --

IMHO it's a simple scheme that should be easy to understand for
extension developers and users.

 - Stig

-- 
  Stig Sæther Bakken [EMAIL PROTECTED]
  Fast Search  Transfer ASA, Trondheim, Norway

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] extension/module versioning

2001-05-05 Thread Anil Madhavapeddy

[EMAIL PROTECTED] wrote:

 $version_id = xml_version();

 or

 $version_id = ibase_version();


Probably better to do something like this:
$version = get_extension_version('xml');
to avoid cluttering the namespace with more functions.

Although, why not just use phpversion() ?  Extensions aren't really
versioned separately are they?

Anil


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] extension/module versioning

2001-05-05 Thread avi


On Sun, 6 May 2001, Anil Madhavapeddy wrote:

hey anil,

 Probably better to do something like this:
 $version = get_extension_version('xml');
 to avoid cluttering the namespace with more functions.

whatever it takes 8^)

 Although, why not just use phpversion() ?

because then you can't write a nice little script to automate the process.

 Extensions aren't really
 versioned separately are they?

i don't believe they are now, but i do believe they should be.

- avi


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]