In September 2025, the PHP community voted to make PIE, the PHP Installer for Extensions, the recommended way to install extensions. The test covered PIE 1.5.2, including a real extension build and a later uninstall. PIE is distributed as a PHAR and installs compiled extensions into a PHP installation. Packages come from Packagist’s extension registry.
pie repository:add path /path/to/pieh
pie info demo/pieh
pie install demo/piehPIE downloads source code, runs phpize, configure and make, places the resulting .so file in the PHP extension directory, and writes the extension= setting for PHP. Windows uses precompiled DLL packages, so a compiler is not required there. The change follows the RFC “Recommend PIE and deprecate PECL”, which passed with 36 votes in favor, none against, and 5 abstentions. It changes the recommendation and documentation only. PECL still works, and the RFC sets no removal date. Removing the PECL tool or website would require another RFC.
PIE itself requires PHP 8.1 or newer. It can install an extension for a different PHP version. The PHAR is available from the GitHub releases page, and the README documents download verification with `gh attestation verify --owner php pie.phar`. The `pie check-build-tools` command checks the local build environment. A test run found make, autoconf, pkg-config, libtool, unzip and phpize. The documented Linux and macOS requirements also include git, automake, m4, gcc and the development package that supplies phpize for the target PHP version.
Packages use Composer-style vendor/package names. Xdebug is therefore addressed as `xdebug/xdebug`. Packagist lists compatible packages at `packagist.org/extensions`. PIE 1.5.2 also contains search and upgrade commands. The documentation still points to the Packagist list for discovery and recommends running `pie install` again for upgrades, so command availability should be checked against the installed version.
Packagist was unavailable in the test environment, so the example used a small local extension with one function. Its `composer.json` declared `"type": "php-ext"`, and a path repository made it available to PIE. The test used `pie repository:add path /path/to/pieh`, followed by `pie info demo/pieh` and `pie install demo/pieh`. PIE found `demo/pieh:0.1.0`, identified the provided `ext-pieh`, ran phpize and configure with `/usr/bin/php-config`, built `modules/pieh.so`, and installed it as `/usr/lib/php/20230831/pieh.so` for `/usr/bin/php8.3`.
The extension appeared in `php -m`, and its function worked. PIE also created a CLI `conf.d` file with a comment explaining the automatic activation, a priority of 80, and `extension=pieh`. `pie show` reported `pieh:0.1.0` from `demo/pieh:0.1.0`. Uninstalling removed the .so file and the module from `php -m`, but left the INI file in place. PIE commented out the setting as `; extension=pieh ; removed by PIE`, which preserves possible local edits. Configuration management may need to remove the leftover file.
Non-interactive CI jobs can use `--auto-install-build-tools` and `--auto-install-system-dependencies`. The README documents `--select`, including `--select redis=phpredis/phpredis` for project dependencies. The Docker documentation shows a `php:8.4-cli` build step that mounts PIE from `ghcr.io/php/pie:bin`, installs `unzip`, runs `pie install --no-cache asgrim/example-pie-extension`, then removes the package and APT metadata. A multi-stage build keeps compilers and other build tools out of the final image.
PIE 1.4.0 and later can offer to install missing build tools. Multiple PHP installations can be selected with `--with-php-config=/usr/bin/php-config8.2` and, when needed, a matching `--with-phpize-path`. Every command prints the target PHP installation before confirmation. The extension directory is usually privileged; the test ran as root, and the documentation gives no sudo procedure.
A PECL package also needs PIE-compatible metadata and publication on Packagist. Missing packages can be requested from their maintainer or supplied through `pie repository:add vcs <url>`. Configure flags are limited to options declared by the extension, which `pie info vendor/package` displays. Extension authors need `"type": "php-ext"`, or `php-ext-zend` for Zend extensions, plus an optional `php-ext` section with keys such as `extension-name`, `configure-options`, `build-path` and `os-families`. The example manifest also contained a name, license and PHP requirement.
PECL has not been removed in PHP 8.5. PIE targets extensions outside the PHP distribution, so bundled modules such as mysqli and gd continue to use distribution packages or Docker’s `docker-php-ext-install`. Composer manages project libraries. PIE manages compiled extensions installed into PHP.




Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Nothing arrived? Check your spam folder — and mark the mail as "Not spam" so it lands in your inbox next time.