pecl:releasing-a-pecl-package

This is an old revision of the document!


Preparation for first release

This set of tips is intended for people who would like to submit a PHP module or Zend extension that they have written into the PECL repository (for example, so end users can use pecl install yourextension).

  • Write your package first, with a suite of .phpt tests
  • Pick a name for your package
  • Ensure it is licensed correctly (PHP License, MIT, BSD, Apache etc. are all acceptable)
  • Join the pecl-dev mailing list - https://pecl.php.net/support.php#lists
    • Ideally reach out to #php.pecl on EFnet IRC first, or email the pecl-dev list - e.g. (“hi folks, I'd like to release X on PECL...”)
    • Introduce yourself, explain what your package does, why it does it, who will support it etc.
    • “Need a php.net account?” - only tick this if you want to put docs on php.net docs eventually
    • Once account request sent, follow up in #php.pecl on EFnet, so your account can be approved - there are a lot of “invalid” account requests, so its worth politely reaching out to make sure your request is not forgotten
  • Version constant in php_extname.h should be called PHP_EXTNAME_VERSION, e.g. PHP_MYGREATEXT_VERSION (PECL uploader checks this matches package.xml version)
  • Create a package.xml - copy & edit from another package (from git/vcs repo, not a “release”)
  • Ensure you have tested at least against ZTS, NTS, for each PHP version you will support (in automated CI pipeline ideally!)

Creating a release

  • Ensure your PHP_EXTNAME_VERSION contstant in php_extname.h is updated
  • In package.xml
    • Copy the current release into a new changelog.release element
    • Update the current release section (date/time/version/stability/notes)
    • pecl package-validate to check everything looks good
    • Commit update to package.xml
  • Run your tests (e.g. in CI)
  • Recommended to create a tag in your VCS (e.g. git tag -s <version>)
  • Use pecl package to generate a release .tgz file
  • Login and upload the .tgz to https://pecl.php.net/release-upload.php
pecl/releasing-a-pecl-package.1572520840.txt.gz · Last modified: 2019/10/31 11:20 by asgrim