PIE, the PHP Installer for Extensions from The PHP Foundation, is steadily replacing PECL as the standard way to install PHP extensions. PIE 1.6.0 was released on 23 November 2026 with 31 merged pull requests from 9 contributors. The changes are practical: the standalone PIE executable can finally self-update, pie install now checks version constraints of already-installed extensions, --no-dev with --from-lock now warns you instead of silently doing nothing, and pie build always builds from source by default.

This guide shows how to install or upgrade to PIE 1.6, what each change means, and how to use PIE reliably in Docker and CI.

Installing or upgrading PIE

You can run PIE as a PHAR (needs PHP 8.1+ to run PIE itself) or as a self-contained executable built with Static PHP, which works even when the system PHP is old.

PHAR

curl -fsSLO https://github.com/php/pie/releases/latest/download/pie.phar
gh attestation verify --owner php pie.phar   # verify it came from php/pie
sudo install -m 0755 pie.phar /usr/local/bin/pie
pie --version

Executable (Linux x86_64 example)

curl -fsSLo pie https://github.com/php/pie/releases/latest/download/pie-Linux-X64
gh attestation verify --owner php pie
chmod +x pie && sudo mv pie /usr/local/bin/pie

The PIE docs strongly recommend the gh attestation verify step. It proves the file was built by the php/pie GitHub repository, which matters for a tool that compiles and installs native code.

What is new in PIE 1.6

1. Self-update for the executable

When the executable build arrived in PIE 1.4, its self-update mechanism was disabled (issue #739). PR #776 adds self-update for executables, so both distributions can now update themselves:

pie self-update

If you pin PIE in Docker images, keep pinning by version for reproducible builds. Self-update is most useful on developer machines and long-lived servers.

2. pie install respects version constraints of installed extensions

Issue #775 described a real-world trap. A project required ext-mongodb:^2.5.0, the hosting platform shipped mongodb 1.21.5, and PIE reported ✅ Already installed because some version of the extension was present. PR #777 makes pie install check the version constraint, so a mismatched extension is no longer treated as satisfied.

Your project’s requirements still live in composer.json:

{
  "require": {
    "php": "^8.4",
    "ext-mongodb": "^2.5",
    "ext-redis": "*"
  },
  "require-dev": {
    "ext-xdebug": "*"
  }
}

Run pie install in the project directory and PIE resolves the missing (or now, mismatched) extensions. Since PIE 1.5 you must provide package selections when PIE cannot guess a package for an extension; the 1.6 docs add that PIE now keeps an automatically updated map of well-known extensions to package names, cached in PIE’s settings. Set PIE_DISABLE_PACKAGE_MAP_FETCH=1 to opt out, for example in locked-down build environments.

3. --no-dev and --from-lock play nicely

PIE can install exactly what a pie.lock specifies with pie install --from-lock. Issue #778 reported that --no-dev was a silent no-op in that mode, so dev-only extensions such as Xdebug ended up in production images. In 1.6, PR #779 makes PIE warn when you combine the two, so you notice instead of shipping Xdebug by accident.

For production installs without a lock file, --no-dev skips anything declared only in require-dev:

pie install --no-dev

4. pie build always builds

pie build used to be able to pick a pre-packaged binary. PR #774 changes the default to --suppress-download-url-method=pre-packaged-binary, so pie build always compiles. To override, pass something like --suppress-download-url-method=pre-packaged-source.

pie build xdebug/xdebug          # compile only, don't install
pie install xdebug/xdebug        # download, build and install

5. Other improvements

  • Faster operation (#762) and better libdir handling (#749).
  • Mirrors are disabled when PIE overrides download URLs, and PIE retries with the next download method if authentication fails.
  • More library definitions, including libssh for the ssh2 extension, and bundled GD with JPEG and FreeType configure options.
  • pdo_sqlsrv and sqlsrv added to the documented supported extensions.

Using PIE in Docker

PIE is also published as a binary-only Docker image (ghcr.io/php/pie:bin is the latest stable). The documented pattern bind-mounts PIE only for the build step, so it never ends up in your final image:

FROM php:8.4-cli

RUN --mount=type=bind,from=ghcr.io/php/pie:bin,source=/pie,target=/usr/local/bin/pie \
    export DEBIAN_FRONTEND="noninteractive"; \
    set -eux; \
    apt-get update; \
    apt-get install -y --no-install-recommends unzip; \
    pie install --no-cache phpredis/phpredis; \
    apt-get purge -y --auto-remove unzip; \
    rm -rf /var/lib/apt/lists/*

Pin a tag such as 1.6-bin or 1.6.0-bin instead of bin if you want reproducible builds. The image has no PHP runtime of its own, so the base image must satisfy PIE’s requirements. In non-interactive environments PIE will not install missing build tools automatically. Install them yourself, or pass --auto-install-build-tools. You can check them first with pie check-build-tools (available since 1.5).

Keeping extensions up to date

pie upgrade updates every PIE-installed extension within the constraint it was originally installed with. If you installed foo/bar:^1.0, PIE will move you to 1.1.0 but not to 2.0.0. Use explicit constraints when you install:

pie install "xdebug/xdebug:^3.4"
pie upgrade

Moving from PECL

If you still use pecl install, the mapping is simple: pecl install xdebug becomes pie install xdebug/xdebug, and pecl build xdebug becomes pie build xdebug/xdebug. PIE packages are distributed through Packagist like Composer packages, so extension authors only need a composer.json with type php-ext and a tagged release.

Takeaway

PIE 1.6 fixes the small things that cause big headaches in production: wrong extension versions reported as “installed”, dev extensions leaking into images, and an executable that could not update itself. Upgrade PIE on your machines, verify the download with gh attestation verify, and if you build Docker images, re-test your pie install steps. They may now (correctly) flag version mismatches that were hidden before.

Sources: PIE 1.6.0 release notes · PIE usage documentation · PR #777 · PR #779 · PR #774