How Packages Are Built
All PHM packages are built automatically from source and hosted on GitHub. The entire process is open-source and transparent.
Source Repository
Section titled “Source Repository”Packages are built in the phm-dev/php-packages repository. It contains:
- Build scripts for PHP core and extensions
- Extension configuration (versions, dependencies, build flags)
- GitHub Actions workflows for automated builds
- The
index.jsonpackage index that PHM reads when you runphm update
Build Pipeline
Section titled “Build Pipeline”Every day at 3:00 UTC, GitHub Actions workflows check php.net for new PHP patch versions and Packagist for new extension releases. If a new version is found, a build is triggered automatically.
The pipeline:
- Check for updates — compares the latest version on php.net / Packagist with the last built version in GitHub Releases
- Build dependencies — compiles static libraries needed by extensions (e.g., librabbitmq for amqp, ImageMagick for imagick)
- Build PHP core — compiles PHP from source, then packages it into separate archives: common, cli, fpm, cgi, dev, pear
- Build extensions — compiles each extension against the freshly built PHP, packages as individual archives
- Upload to GitHub Releases — each PHP patch version gets its own release (e.g.,
php-8.5.4), old versions are preserved - Update index — regenerates
index.jsonfrom all releases and commits it to the repository
Hosting
Section titled “Hosting”Packages are hosted as GitHub Release assets — there is no separate package server. When you run:
phm updatePHM downloads index.json from the repository. When you install a package:
phm install php8.5-cliPHM downloads the .tar.zst archive directly from GitHub Releases.
Package Format
Section titled “Package Format”Each package is a zstd-compressed tar archive containing:
package.tar.zst├── pkginfo.json # Package metadata (name, version, dependencies)└── files/ └── opt/php/8.5/... # Files to installPlatforms
Section titled “Platforms”Packages are built on macOS runners provided by GitHub Actions:
| Platform | Runner | Status |
|---|---|---|
| Apple Silicon (arm64) | macos-latest | Available |
| Intel (amd64) | macos-15-intel | Available |
Contributing
Section titled “Contributing”Want to add a new extension or report a build issue?
- Open an issue on the php-packages repository
- Extension build configs live in the
extensions/directory