Request for Comments: PECL Versioning

The Problem

Currently, PECL versioning is fairly anarchic. It is impossible to determine the status of an extension, or whether an update will break binary compatibility with previous versions (or work with a given PHP release) without a long try-&-fail process. Windows PECL binaries should have reliable version information in the DLL resources (physically visible in the file properties) as well as at runtime (through phpinfo(), phpversion('extname') etc.). Some of the processes in php.net that currently use hard-coded lists could also benefit from a standardized versioning process. This problem has to be fixed to bring PECL to a higher quality and reliability level.

Some Facts and Figures

There are currently 214 modules in PECL. Of these:

Of the remaining 204:

Requirements

Each PECL package should adhere to the following requirements:

Optional Extras

The cvs $Revision$ or $Id$ placeholder (or any other revision control placeholders) may be used in PHP_MINFO(), but cannot replace the version number.

Version Naming

There are two kind of packages in PECL: normal PHP extensions providing a set of APIs (e.g. http, enchant, fileinfo) and those providing only data (e.g. timezonedb). Normal extensions should use the standard version number defined below. Data packages should use the versioning offered by the underlying package:

The vast majority of PECL packages fall into the 'normal' category. The basic guidelines for these are:

Example: Lifecycle of a package
Release type Changes Version Notes
development release initial release 0.1.0a1 initial version
development release features added 0.2.0a1 BC break allowed
alpha release features added 0.9.0a1 BC break allowed - but discouraged
beta release bug fixes 0.9.0b1 BC break allowed - but discouraged
beta release bug fixes 0.9.0b2 BC break allowed - but discouraged
RC release bug fixes 1.0.0RC1 BC break allowed - but heavily discouraged
stable release no changes 1.0.0 BC break is not allowed
stable release bug fixes 1.0.1 BC break is not allowed
development release features added 1.1.0a1 BC break is not allowed
beta release bug fixes 1.1.0b1 BC break is not allowed
stable release bug fixes 1.1.0 BC break is not allowed
stable release features added 1.2.0 BC break is not allowed
development release major changes 2.0.0a1 BC break is allowed
alpha release major changes 2.0.0a1 BC break is allowed - but discouraged
beta release bug fixes 2.0.0b1 BC break is allowed - but discouraged
RC release features added 2.0.0RC1 BC break is allowed - but heavily discouraged
RC release bug fixes 2.0.0RC2 BC break is allowed - but heavily discouraged
stable release bug fixes 2.0.0 BC break is not allowed
stable release bug fixes 2.0.1 BC break is not allowed

Core Modules in PECL

Johannes Schlueter - as Release Master of the PHP 5.3 series - made it known early in the proceedings that he has concerns over -dev, alpha or beta tags appearing in PHP core module versions. There's no process in place to export PECL releases into the PHP core; many of the modules in PECL are symlinked into the PHP core, affecting both snapshots and releases. This has benefits for the PECL modules concerned, in that they get far more testing than they otherwise might during the PHP development cycle, but the point remains that they are linked directly rather than filtered through an independent PECL release process.

The idea of using the tag '-core' rather than '-dev' to reflect the status of those dual-nature extensions came up. The PECL versioning could then remain x.x.x (no tag) during PECL releases, with the version number itself used to reflect alpha/beta development status. Christopher Jones of Oracle voiced his concern regarding core PECL modules in separate development branches, which happens with core symlinking (and can of course occur manually too). “Should the version in CVS HEAD be tagged -core6?” Pierre Joye recommended that module versions with a conflicting API simply reflect this in the version number, e.g. 1.0.3-core for PHP 5.* and 2.0.3-core for PHP 6. The PECL releases would be 1.0.3 and 2.0.3 respectively, and the version bumped to 1.0.4-core/2.0.4-core following release.

Feedback on this subject would be appreciated!

Please comment on the pecl-dev mailing list