pear:rfc:pear2_versioning_standard_revision
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
pear:rfc:pear2_versioning_standard_revision [2009/06/27 16:09] – created cellog | pear:rfc:pear2_versioning_standard_revision [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 7: | Line 7: | ||
* Title: PEAR2 Versioning Standards Revision | * Title: PEAR2 Versioning Standards Revision | ||
* Version: | * Version: | ||
- | * Status: | + | * Status: |
* Type: Standards | * Type: Standards | ||
- | * Last updated: | + | * Last updated: |
==== Author(s) Information ==== | ==== Author(s) Information ==== | ||
* Name: Gregory Beaver | * Name: Gregory Beaver | ||
* Email: cellog@php.net | * Email: cellog@php.net | ||
+ | * Name: Brett Bieber | ||
+ | * Email: saltybeagle@php.net | ||
==== Legal Information ==== | ==== Legal Information ==== | ||
Line 73: | Line 75: | ||
This document describes the versioning standards for the PEAR2 repository that will make the | This document describes the versioning standards for the PEAR2 repository that will make the | ||
- | paranoia setting work. | + | paranoia setting work, and defines the version and api numbering process when backwards compatibility is broken. |
+ | |||
+ | Breaking backwards compatibility requires changing the major ' | ||
+ | changing the major ' | ||
===== Approach & Requirements ===== | ===== Approach & Requirements ===== | ||
Line 86: | Line 91: | ||
First, some framework basics: | First, some framework basics: | ||
- | - The first API version of a new, non-stable package shall be 0.1.0 | + | |
- | - The API version of any beta/ | + | - The API version of any beta/ |
- | - The API version of the first stable release shall be 1.0.0, independent of the following rules | + | - The API version of the first stable release shall be 1.0.0, independent of the following rules |
- | Next, the API version | + | otherwise, API version |
- | + | ||
- | Follow | + | |
| | ||
| | ||
+ | | ||
$X = $version[0]; | $X = $version[0]; | ||
$Y = $version[1]; | $Y = $version[1]; | ||
$Z = $version[2]; | $Z = $version[2]; | ||
- | if (Breaking | + | if ($X >= 1 && First release breaking |
$X += 1; | $X += 1; | ||
$Y = 0; | $Y = 0; | ||
- | $Z = 0; // so version 1.2.3 becomes 2.0.0 or 2.0.0a1 for alpha, 2.0.0b1 for beta, etc. | + | $Z = 0; // so version 1.2.3 becomes 2.0.0 or 2.0.0a1 for alpha, 2.0.0b1 for beta API, etc. |
+ | if ($X >= 1) { | ||
+ | if ($stability will be alpha) { | ||
+ | $Z .= ' | ||
+ | } elseif ($stability will be beta) { | ||
+ | $Z .= ' | ||
+ | } | ||
+ | } | ||
} elseif (adding new features) { | } elseif (adding new features) { | ||
$Y += 1; | $Y += 1; | ||
$Z = 0; // so version 1.2.3 becomes 1.3.0 | $Z = 0; // so version 1.2.3 becomes 1.3.0 | ||
- | } elseif (fixing bugs only) { | + | } elseif (fixing bugs in API only) { |
$Z += 1; // so version 1.2.3 becomes 1.2.4 | $Z += 1; // so version 1.2.3 becomes 1.2.4 | ||
} | } | ||
+ | |||
+ | An "API bug" is defined as a mismatch between the program' | ||
The next section addresses release version. | The next section addresses release version. | ||
Line 114: | Line 127: | ||
First, some framework basics: | First, some framework basics: | ||
- | - The first Release version of a new, non-stable package shall be 0.1.0 | + | |
- | - The Release version of the first stable release shall be 1.0.0, independent of the following rules | + | - The first Release version of a release candidate shall be 1.0.0RC1 |
+ | - The first Release version of release candidates for major changes shall have " | ||
+ | | ||
- | Release version shall be set by the following pseudo-code: | + | otherwise, |
| | ||
| | ||
+ | | ||
$X = $version[0]; | $X = $version[0]; | ||
$Y = $version[1]; | $Y = $version[1]; | ||
$Z = $version[2]; | $Z = $version[2]; | ||
- | if (Breaking | + | if ($X >= 1 && (First release (breaking |
$X += 1; | $X += 1; | ||
$Y = 0; | $Y = 0; | ||
- | $Z = 0; // so version 1.2.3 becomes 2.0.0 or 2.0.0a1 | + | $Z = 0; // so version 1.2.3 becomes 2.0.0 |
+ | if ($X >= 1) { | ||
+ | if (will be alpha) { | ||
+ | $Z .= ' | ||
+ | } elseif (will be beta) { | ||
+ | $Z .= ' | ||
+ | } | ||
+ | } | ||
} elseif (adding new features) { | } elseif (adding new features) { | ||
$Y += 1; | $Y += 1; | ||
Line 134: | Line 157: | ||
$Z += 1; // so version 1.2.3 becomes 1.2.4 | $Z += 1; // so version 1.2.3 becomes 1.2.4 | ||
} | } | ||
+ | |||
+ | ===== Other Examples ===== | ||
+ | |||
+ | For the next release after version 0.1.0/0.1.0 (API/ | ||
+ | |||
+ | still unstable: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | API bugfix: API 0.1.1, Release 0.1.1 | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | next release candidate: API 1.0.0, Release 1.0.0RC2 | ||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | For the next release after version 1.0.0/1.0.0 (API/ | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | API bugfix: <not applicable> | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | API bugfix: <not applicable> | ||
+ | |||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | API bugfix: <not applicable> | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | API bugfix: API 1.0.1, Release 1.0.1 | ||
+ | |||
+ | |||
+ | ===== A typical life cycle ===== | ||
+ | |||
+ | API 0.1.0/ | ||
+ | API 0.1.0/ | ||
+ | API 0.1.1/ | ||
+ | API 0.2.0/ | ||
+ | API 0.3.0/ | ||
+ | |||
+ | API 0.4.0/ | ||
+ | API 1.0.0/ | ||
+ | API 1.0.0/ | ||
+ | API 1.0.1/ | ||
+ | API 1.0.1/ | ||
+ | |||
+ | API 1.0.1/ | ||
+ | API 1.0.1/ | ||
+ | API 1.0.2/ | ||
+ | |||
+ | API 1.1.0/ | ||
+ | API 1.1.0/ | ||
+ | |||
+ | API 1.2.0a1/ | ||
+ | API 1.2.0a2/ | ||
+ | API 1.2.0b1/ | ||
+ | API 1.2.0/ | ||
+ | API 1.2.0/ | ||
+ | |||
+ | API 2.0.0a1/ | ||
+ | API 2.0.0b1/ | ||
+ | API 2.0.0/ | ||
+ | API 2.0.0/ | ||
+ | API 2.0.0/ | ||
===== Expiration ===== | ===== Expiration ===== |
pear/rfc/pear2_versioning_standard_revision.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1