pearweb_index
[ class tree: pearweb_index ] [ index: pearweb_index ] [ all elements ]

Source for file 20040226-vn.php

Documentation is available at 20040226-vn.php

  1. <?php
  2. /*
  3.    +----------------------------------------------------------------------+
  4.    | PEAR Web site version 1.0                                            |
  5.    +----------------------------------------------------------------------+
  6.    | Copyright (c) 2003-2005 The PEAR Group                               |
  7.    +----------------------------------------------------------------------+
  8.    | This source file is subject to version 2.02 of the PHP license,      |
  9.    | that is bundled with this package in the file LICENSE, and is        |
  10.    | available at through the world-wide-web at                           |
  11.    | http://www.php.net/license/2_02.txt.                                 |
  12.    | If you did not receive a copy of the PHP license and are unable to   |
  13.    | obtain it through the world-wide-web, please send a note to          |
  14.    | license@php.net so we can mail you a copy immediately.               |
  15.    +----------------------------------------------------------------------+
  16.    | Authors: Martin Jansen <mj@php.net>                                  |
  17.    +----------------------------------------------------------------------+
  18.    $Id: 20040226-vn.php,v 1.6 2005/01/26 12:40:07 pajoye Exp $
  19. */
  20. response_header("The PEAR Group: Version Naming");
  21. ?>
  22.  
  23. <h1>PEAR Group - Administrative Documents</h1>
  24.  
  25. <h2>&raquo; Version Naming</h2>
  26.  
  27. <p>Published: 26th Februray 2004</p>
  28.  
  29. <p>The PEAR Group would like to take this opportunity to define the 
  30. following version naming convention, which will be mandatory for all 
  31. packages from now on. All developers should attempt to move to 
  32. this new version naming scheme as soon as possible.</p>
  33.  
  34. <p>Vote Results: +1 (6), -1 (0), +0 (2)</p>
  35.  
  36. <h3>&raquo; Current Versioning Method</h3>
  37.  
  38. <p>The current status quo is that version names should follow the 
  39. progression defined by the version_compare() function.</p>
  40.  
  41. <h3>&raquo; New Versioning Method</h3>
  42.  
  43. <p>Note that the version number is not the same as the version name. The 
  44. version name is the final name of a version which consists of the 
  45. version number and an optional suffix. See the following for details.</p>
  46.  
  47. <p>To determine the version name of a release use the following rule set:</p>
  48.  
  49. <ul>
  50. <li>A version number must include a major, a minor and a patch level 
  51. version number. Please note that all are version numbers are mandatory.</li>
  52.  
  53. <li>A package version has a &quot;state&quot; (as indicated in the package.xml file), 
  54. which describes the maturity. The state may be one of &quot;dev&quot;, &quot;alpha&quot;, 
  55. &quot;beta&quot;, &quot;RC&quot; or &quot;stable&quot; (listed in the order of code maturity). Please 
  56. note that the state &quot;RC&quot; is achieved by using the state &quot;beta&quot; and 
  57. appending the version number with &quot;RC&quot; followed by an integer</li>
  58.  
  59. <li>A backwards-compatability break may include feature additions</li>
  60.  
  61. <li>A feature addition may include bug fixes</li>
  62.  
  63. <li>The version name is always computed on the version name of the 
  64. release, on which the new release is based, if one exists.</li>
  65.  
  66. <li>The version number must be greater or equal than 0.1.0</li>
  67.  
  68. <li>All initial releases of a package with states &quot;dev&quot;, &quot;alpha&quot;, or 
  69. &quot;beta&quot; prior to the first stable release should have a version number 
  70. less than &quot;1.0.0&quot;.</li>
  71.  
  72. <li>The first release with state &quot;RC&quot; or &quot;stable&quot; must have a version 
  73. number of &quot;1.0.0&quot;.</li>
  74.  
  75. <li>There may not be a stable release unless there has been at least 
  76. one release before with the same major version.</li>
  77.  
  78. <li>BC may only be broken in releases that have a version number of 
  79. &quot;x.0.0&quot; with a state lower than stable or that have a version number 
  80. below &quot;1.0.0&quot;. As a converse only releases that break BC or that have a 
  81. version number of &quot;1.0.0&quot; may increase the major version number compared 
  82. to the previous release.</li>
  83.  
  84. <li>Features may only be added in releases that have a version number 
  85. of &quot;x.y.0&quot; (where &quot;y > 0&quot;). As a converse the minor version may only be 
  86. increased in releases that add features.</li>
  87.  
  88. <li>For releases that only fix bugs the version number should be 
  89. &quot;x.y.z&quot; (where &quot;z > 0&quot;) unless the maturity state is increased. As a 
  90. converse the patch level number should only be used (as in non zero) in 
  91. releases that only fix bugs.</li>
  92.  
  93. <li>The state should always be added as a suffix unless the state is 
  94. &quot;stable&quot; (please note that as stated above the state &quot;beta&quot; is used for 
  95. beta releases and for release candidates). The suffix consists of the 
  96. state followed by a number which is incremented with every subsequent 
  97. release with the same state.</li>
  98.  
  99. <li>In the lifecycle of a package each major version increase it is 
  100. only once (once from major version number 0 to 1, from 1 to 2 etc.).</li>
  101.  
  102. </ul>
  103.  
  104. <h4>Example: Lifecycle of a package</h4>
  105.  
  106. <table border="1" cellpadding="2" cellspacing="0">
  107. <tr>
  108. <th>Release type</th><th>Changes</th><th>Version</th><th>Notes</th>
  109. </tr>
  110. <tr>
  111. <td>development release     </td><td>   initial release     </td><td>   0.1.0dev1   </td><td>   initial version</td>
  112. </tr>
  113. <tr>
  114. <td>development release     </td><td>   features added      </td><td>   0.2.0dev1   </td><td>   BC break allowed</td>
  115. </tr>
  116. <tr>
  117. <td>alpha release           </td><td>   features added      </td><td>   0.9.0alpha1 </td><td>   BC break allowed - but discouraged</td>
  118. </tr>
  119. <tr>
  120. <td>beta release            </td><td>   bug fixes           </td><td>   0.9.0beta1  </td><td>   BC break allowed - but discouraged</td>
  121. </tr>
  122. <tr>
  123. <td>beta release            </td><td>   bug fixes           </td><td>   0.9.0beta2  </td><td>   BC break allowed - but discouraged</td>
  124. </tr>
  125. <tr>
  126. <td>RC release              </td><td>   bug fixes           </td><td>   1.0.0RC1    </td><td>   BC break allowed - but heavily discouraged</td>
  127. </tr>
  128. <tr>
  129. <td>stable release          </td><td>   no changes          </td><td>   1.0.0       </td><td>   BC break is not allowed</td>
  130. </tr>
  131. <tr>
  132. <td>stable release          </td><td>   bug fixes           </td><td>   1.0.1       </td><td>   BC break is not allowed</td>
  133. </tr>
  134. <tr>
  135. <td>development release     </td><td>   features added      </td><td>   1.1.0dev1   </td><td>   BC break is not allowed</td>
  136. </tr>
  137. <tr>
  138. <td>beta release            </td><td>   bug fixes           </td><td>   1.1.0beta1  </td><td>   BC break is not allowed</td>
  139. </tr>
  140. <tr>
  141. <td>stable release          </td><td>   bug fixes           </td><td>   1.1.0       </td><td>   BC break is not allowed</td>
  142. </tr>
  143. <tr>
  144. <td>stable release          </td><td>   features added      </td><td>   1.2.0       </td><td>   BC break is not allowed</td>
  145. </tr>
  146. <tr>
  147. <td>development release     </td><td>   major changes       </td><td>   2.0.0dev1   </td><td>   BC break is allowed</td>
  148. </tr>
  149. <tr>
  150. <td>alpha release           </td><td>   major changes       </td><td>   2.0.0alpha1 </td><td>   BC break is allowed - but discouraged</td>
  151. </tr>
  152. <tr>
  153. <td>beta release            </td><td>   bug fixes           </td><td>   2.0.0beta1  </td><td>   BC break is allowed - but discouraged</td>
  154. </tr>
  155. <tr>
  156. <td>RC release              </td><td>   features added      </td><td>   2.0.0RC1    </td><td>   BC break is allowed - but heavily discouraged</td>
  157. </tr>
  158. <tr>
  159. <td>RC release              </td><td>   bug fixes           </td><td>   2.0.0RC2    </td><td>   BC break is allowed - but heavily discouraged</td>
  160. </tr>
  161. <tr>
  162. <td>stable release          </td><td>   bug fixes           </td><td>   2.0.0       </td><td>   BC break is not allowed</td>
  163. </tr>
  164. <tr>
  165. <td>stable release          </td><td>   bug fixes           </td><td>   2.0.1       </td><td>   BC break is not allowed</td>
  166. </tr>
  167. </table>
  168.  
  169. <h4>Automation</h4>
  170.  
  171. <p>It should be possible to turn this rule set into a little tool which can 
  172. compute the next version for you based on questions you answer (like is 
  173. this the first release, did this release break BC?, what state should 
  174. this release have etc.)</p>
  175.  
  176. <p>This should make it possible to generate correct version numbers without 
  177. going through this rather lengthy list.</p>
  178.  
  179. <p>A sample implementation can be found at 
  180. <?php print_link("http://www.backendmedia.com/PEAR/version_generator.phps")?>.</p>
  181.  
  182. <p>Please note that this implementation currently does not enforce the 
  183. usage of the patch level version number and still uses the state &quot;RC&quot; 
  184. instead of &quot;beta&quot; for release candidates.</p>
  185.  
  186. <p>Future versions of the PEAR packager will hopefully include 
  187. functionality validate the version name based on relevant metadata set 
  188. in the package.xml and by comparing the package API with prior versions.</p>
  189.  
  190. <?php
  191.  
  192. echo make_link('/group/''Back');
  193.  
  194. response_footer();

Documentation generated on Mon, 11 Mar 2019 15:14:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.