Aruba: base/versionsapi changes
Marty Vance <[email protected]> Thu, 10 Sep 2009 16:31:02 -0600
| Newsgroups | gmane.comp.cms.xaraya.devel |
|---|---|
| Organization | Xaraya |
| Message-ID | <[email protected]> |
In order to more accurately reflect the current state of RFC44, section 6 (Version Numbers), I have revamped the versionapi in the base module. All version numbers in Xaraya Aruba (core, modules, themes, anything with a version) operate around a single regular expression for parse/validate/compare operations: /^([1-9]\d*|0)\.([1-9]\d*|0)\.([1-9]\d*|0)(-(a|b|rc)([1-9]\d*))?$/ This is a codification of the format described in RFC44, section 6.1. Some notes on this format: - Required "<major>.<minor>.<micro>" - Optional "-<suffix><revision>" - Numeric components do not use leading 0 - Suffixes are lower case (a, b, rc) for Alpha, Beta, Release Candidate Changes in the versionsapi functions: normalize: Dropped, no longer needed assert_application: Changed to reflect updates compare: Changed to reflact updates. Argument changes: - removed: levels, sep, normalize, validate, and order - added: strict (boolean, default true; false only compares x.y.z portions validate: Changed to reflect updates parse: (new) extracts a version number string into an array of its components: major, minor, micro, suffix, rev unparse: (new) reassembles a version array into a string order: not completed yet Calls to compare in modules/xaradminapi/regenerate and modules/xaradminapi/verifydependency were changed accordingly. A new validation for version numbers is at html/includes/validations/version.php See also: http://www.xaraya.com/index.php/xarbb/topic/3502