The PHP Installer for Extensions
PIE is the official installer for PHP extensions, which replaces PECL (which is now deprecated). PIE is distributed as a PHAR, just like Composer, and works in a similar way to Composer, but it installs PHP extensions (PHP Modules or Zend Extensions) to your PHP installation, rather than pulling PHP packages into your project or library.
You will need PHP 8.1 or newer to run PIE, but PIE can install an extension to any other installed PHP version.
On Linux/OSX, if any build tools needed are missing, PIE will ask if you would like to automatically install them first (as of PIE 1.4.0).
On Windows, you do not need any build toolchain installed, since PHP extensions for Windows are distributed as pre-compiled packages containing the extension DLL.
pie.phar either:
gh attestation verify --owner php pie.pharphp pie.phar <command>Further installation details can be found in the usage docs.
This documentation assumes you have moved pie.phar into your $PATH, e.g.
/usr/local/bin/pie on non-Windows systems or created an alias in your shell RC file.
This will install PIE into /usr/local/bin/pie on a non-Windows system:
curl -fL --output /tmp/pie.phar https://github.com/php/pie/releases/latest/download/pie.phar \
&& gh attestation verify --owner php /tmp/pie.phar \
&& sudo mv /tmp/pie.phar /usr/local/bin/pie \
&& sudo chmod +x /usr/local/bin/pieYou can install an extension using the install command. For example, to
install the example_pie_extension extension, you would run:
…As of PIE 1.5 you can install multiple extensions at the same time. Note that if multiple extensions share the same configure options, this command will fail.
pie install foo/great-extension bar/another-extensionWhen in your PHP project, you can install any missing top-level extensions:
…[!IMPORTANT] If you are running PIE in a non-interactive shell (for example, CI, a container), the
--allow-non-interactive-project-installis no longer functional. You must specify--selectflags for each missing package, e.g.:pie install \ --select example_pie_extension=asgrim/example-pie-extension \ --select redis=phpredis/phpredis
A list of extensions that support PIE can be found on https://packagist.org/extensions.
If you are an extension maintainer wanting to add PIE support to your extension, please read extension-maintainers.
The full documentation for PIE can be found in usage docs.
No open issues yet, or sync has not completed.