Hello everyone,
Let's talk about our function versioning information, you know, the
part about when a function is available in PHP (or PECL).
Past situation (~2002-2007):
- CVS module named functable
- Written in awk
- Few knew how it worked
- No PECL information
Current situation (2008):
- phpdoc/scripts/functable.php
- It generates phpdoc/phpbook/phpbook-xsl/version.xml
- Essentially a port of awk functable to PHP
- Eliminated PHP 3 version info
- Requires an SQLite database
- Relies on function prototypes in source
Problems and considerations:
- A lot of functions are missing version information
- Typically we must manually update the generated version.xml
- Some functions go in and out of PECL, or are in both
- Prototypes get fixed but it's "too late" for our system
- Our system rechecks every PHP release
The system scours the PHP sources by checking out every release (tag)
from CVS (since PHP 4.0.0) then determines when:
- A function became available in PHP or PECL
- A function was removed from PHP or PECL
- So basically when the function existed
Let's now reconsider this entire process and fix it. There are several
questions:
1. How should we store the version information?
A. Store version information within each functions file
B. ... within each extensions directory (version.xml files per
extension)
C. ... within one huge version.xml file (as currently done)
D. ...
This email is getting too long so I'll stop here. Please provide input
on this situation in the form of questions, answers, comments,
anything... for example you might ask "Since a functions born date
never changes, why not hardcode it within the functions docs?" and I
agree but wonder if we're missing something here. Like, would it cause
problems for translators? Comments?
And on a related note, the following will show you what's missing
version information:
$ cd phpdoc
$ php configure.php
$ phd --docbook .manual.xml --theme bightml --verbose
VERBOSE_NOVERSION
Regards,
Philip