Table of Contents

PHP RFC: Pickle

Proposes a new extension manager

https://github.com/pierrejoye/pickle

Introduction

This RFC proposes a new installer for PHP extensions.

Proposal

Main goals:

The current PEAR/PECL installer is not used anymore. BC could be kept by converting the package.xml before running the installer. However there is no plan yet to support PEAR/PECL channels support.

A packagist-like system will be implemented in pecl.php.net. We are still discussing this with the composer developers.

Concept

One of the main goal is to reduce meta data duplication, making the whole extension release process less error prone.

To achieve that, the existing information will be used. package.xml won't be used anymore (except if conversion is required). New files are introduced for the release changelogs. The naming format of the release changelog is RELEASE-x.y.z, where x.y.z is the actual version (should work fine with the TZ package, 20140611). Other existing files will be used for the rest of the meta information:

(API information still need to be done manually, but we could drop this info as it is only used by PEAR so far)

The CREDITS file will require some changes, email and the actual pecl/php.net handle as well as the homepage. We may implement something to fetch this information at packaging time from php.net, but that will prevent offline packaging.

A minimal json definition:

{
    "name": "apcu",
    "type": "extension",
    "extra": {
        "configure-options": {
            "enable-apc-bc": {
                "default": "yes",
                "prompt": "Enable full APC compatibility"
            },
            "enable-apcu-debug": {
                "default": "no",
                "prompt": "Enable internal debugging in APCu"
            }
        }
    }
}

Any other information will be added automatically on packaging:

{
    "name": "apcu",
    "type": "extension",
    "extra": {
        "configure-options": {
            "enable-apc-bc": {
                "default": "yes",
                "prompt": "Enable full APC compatibility"
            },
            "enable-apcu-debug": {
                "default": "no",
                "prompt": "Enable internal debugging in APCu"
            }
        }
    },
    "version": "4.0.4",
    "state": "beta",
    "authors": [
        {
            "name": "Joe",
            "handle": "Watkins",
            "email": "krakjoe",
            "homepage": "krakjoe@php.net"
        },
        {
            "name": "Anatol",
            "handle": "Belski",
            "email": "ab",
            "homepage": "ab@php.net"
        }
    ]
}

Pacakges support

It will also possible to install an extension using a release archive, a git repository URL or directly from the source tree. Packaging and conversion already works using the source tree.

If someone likes to add git/http/etc support, it would be awesome, as this feature will remain no matter which other changes may happen in other part of the tool.

Backward Incompatible Changes

Everyone relying on the pecl command will have to migrate to pickle.

Proposed PHP Version(s)

Next PHP release once the new system is stable enough (TBD).

Todos (unordered)

References

https://github.com/composer/composer/pull/498 https://github.com/composer/composer/pull/2898