pecl:releasing-a-pecl-package
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 in thetests
directory. - Pick a name for your package
- Ensure it is licensed correctly (PHP License, MIT, BSD, Apache etc. are all acceptable, but GPL or LGPL are not)
- Join the pecl-dev mailing list - https://pecl.php.net/support.php#lists
- Apply for a PECL account under your own name (don't use a 'team name') - https://pecl.php.net/account-request.php
- 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
- Use strict GCC flags - https://github.com/xdebug/xdebug/blob/master/config.m4#L36-L75
- Version constant in
php_extname.h
should be calledPHP_EXTNAME_VERSION
, e.g.PHP_MYGREATEXT_VERSION
(PECL uploader checks this matchespackage.xml
version) - Create a
package.xml
- copy & edit from another package (from git/vcs repo, not a “release”)- Make sure that you update the maintainers section with your user, and that your user is only marked as lead (and not listed twice).
- 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 inphp_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 (alpha, beta, stable), and notes
pecl package-validate
to check everything looks good
- Run your tests (e.g. in CI)
- Use
pecl package
to generate a release.tgz
file - Commit update to
package.xml
- Recommended to create a tag in your VCS (e.g.
git tag -s <version>
) and sign it with a GPG key if you can - Login and upload the
.tgz
to https://pecl.php.net/release-upload.php
For an example of a more comprehensive release process, it might be worth checking out https://github.com/xdebug/xdebug/blob/master/RELEASE_PROCESS.rst
Windows binary packages
Windows binary packages (including the DLLs) are supposed to be built and linked on the package page automatically. If that didn't happen several hours after the release, contact the PHP for Windows team via #winphp-dev on freenode IRC or email the pecl-dev list.
pecl/releasing-a-pecl-package.txt · Last modified: 2019/10/31 12:35 by cmb