| ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot |
Package versionVersioning and stability are separate entities for packages. The version of a package is a numeric string like 1.2.3 that is incremented every time a new version of the package is released. The stability of a package determines how likely the package is to contain bugs or to have changes to its API. In addition, PEAR makes a distinction between the API version and the package version. Versioning guidelinesThere are a few conventions that should be followed when deciding which version number or stability to use for your package. Version numbers should always contain three decimals such as 1.2.3. This is because of the way that PHP's version_compare() function calculates the difference between versions:
<?php
The example above shows that in fact version 1.0 is considered to be a different version from version 1.0.0, a distinction that is confusing at best for users. Use of 3 decimals for every version will ensure that both your users and PHP will not be confused by which of two versions is the same or newer. Package versions can be abstractly referred to as X.Y.Z. For version 1.2.3, X is 1, Y is 2 and Z is 3. Generally speaking, it is best if X is used to refer to major API changes, sweeping addition of new features, or any break of backwards compatibility. The Y component should be reserved for small to large feature additions, but should never be used for breaks of backwards compatibility. The Z component should only be used for bugfixes. These three questions can be used to determine how to increase the version number:
Here is a typical life cycle for a package:
Note that the PEAR coding standards require packages to be renamed when they break backwards compatibility. Thus, a PEAR package can never reach version 2.0.0. |
各種マニュアル:
PHPマニュアル |
PEARマニュアル |
Smarty(英語)マニュアル |
PHP-GTKマニュアル |
「Package version」をGoogle検索
|