Introducing PIE: The Modern PHP Extension Installer

· Oskar Stark · Expertise · 2 minutes to read
Image of a desk with a laptop and monitor

Discover PIE, the new PHP Installer for Extensions, a modern tool that simplifies managing PHP extensions with a Composer-like workflow. Say goodbye to PECL complexities and streamline your development process with PIE.

The PHP ecosystem continues to evolve, and with it comes a groundbreaking new tool: PIE (PHP Installer for Extensions). PIE is designed to simplify and modernize the installation and management of PHP extensions, much like how Composer transformed dependency management in PHP projects.

While PECL has long been the standard for managing PHP extensions, PIE introduces a more developer-friendly approach that aligns with modern workflows. In this post, we’ll explore the capabilities of PIE, its advantages over PECL, and how you can get started.

What is PIE?

PIE (PHP Installer for Extensions) is a command-line tool that makes installing and managing PHP extensions as straightforward as using Composer. PIE treats extensions as first-class citizens in the PHP ecosystem and allows developers to install them directly from Packagist repositories.

Core Features of PIE:

  • Simplified Installation: Install PHP extensions with a single command.

  • Composer-like Workflow: Integrates seamlessly into modern PHP development practices.

  • Version Compatibility: Install extensions for different PHP versions with ease.

  • User-Friendly Syntax: A familiar syntax like pie install vendor/package.

PIE is especially helpful for developers who want to avoid the complexities of PECL or manual compilation steps.

Comparing PIE and PECL

While PECL has been the traditional method for installing PHP extensions, it comes with certain limitations that PIE addresses. PECL relies on a centralized repository and requires manual steps for installation, often making it cumbersome for developers unfamiliar with its process. In contrast, PIE introduces a modern approach similar to Composer.

With PIE, developers can install extensions using simple commands like pie install ext-redis, pulling them directly from Packagist. It also allows you to specify versions easily, such as pie install ext-redis:^5.3, enabling better control over compatibility with different PHP versions.

Where PECL requires manual intervention for enabling extensions and managing dependencies, PIE automates much of this work. It integrates seamlessly with modern PHP workflows, making it easier to include extensions as part of your project setup or CI/CD pipelines.

In short, while PECL has served its purpose for years, PIE offers a cleaner, more developer-friendly experience, aligning with modern PHP tools and practices.

Getting Started with PIE

Getting started with PIE is straightforward. Follow these simple steps:

1. Install PIE:
Download the pie.phar executable from the official repository and move it into your system's $PATH :

wget https://github.com/php/pie/releases/latest/download/pie.phar  
chmod +x pie.phar  
mv pie.phar /usr/local/bin/pie

2. Installing an Extension:
Use PIE’s simple syntax to install any extension:

pie install ext-redis

This command will download and configure the Redis extension automatically.

3. Specify Version Requirements:
Similar to Composer, you can install a specific version:

pie install ext-redis:^5.3

4. Enabling the Extension:
PIE simplifies the process, but you still need to enable the extension in your php.ini file:

extension=redis.so

Example: Installing Multiple Extensions

With PIE, you can streamline the installation of multiple extensions for your project. Consider this example for a typical setup:

pie install ext-redis ext-xdebug ext-pdo_pgsql  

This command installs Redis, Xdebug, and PostgreSQL PDO extensions in one step, saving time and effort.

Real-World Benefits

1. Simplicity for Developers:

With a familiar syntax and modern workflow, PIE is much easier to use than PECL.

2. Better Integration with Projects:

Extensions are available on Packagist, meaning you can declare them alongside your Composer dependencies in composer.json for consistent project environments.

3. Improved Version Management:

PIE allows you to specify versions, ensuring compatibility with different PHP versions during local development, testing, and production.

4. Faster Automation:

PIE’s command-line capabilities integrate seamlessly with CI/CD pipelines, making extension installation part of your automated workflows.

What's Next?

While PIE is still in its early stages, the community is quickly adopting it as a modern alternative to PECL. The PHP Foundation, along with extension maintainers, continues to improve PIE and add support for more extensions.

Conclusion

PIE represents a significant step forward for PHP developers. By bringing a Composer-like workflow to PHP extensions, PIE eliminates the frustrations of manual installations and dependency management.

If you’re already using Composer in your projects, adopting PIE will feel natural and provide a cleaner, more modern way to manage PHP extensions.

Ready to try PIE?

Head over to the official PIE GitHub repository to get started and give your PHP development workflow the upgrade it deserves!

All available extensions can be found on Packagist.org

Want to use PIE in your projects?

At SensioLabs, we help teams implement this new way for PHP extensions. Contact us today to learn more!

This might also interest you

Two US passports with plane tickets inside with a hand holding them on the left
Mathieu Santostefano

Login with [anything]: native OIDC login comes to Symfony 8.2

Symfony 8.2, the upcoming version of Symfony, ships a first-class OIDC (OpenID Connect) Authorization Code Flow authenticator. Here is what it does, why it is secure by default, and what I learned building it.

Read more : Login with [anything]: native OIDC login comes to Symfony 8.2
Abstract editorial illustration of PHP 8.6 JSON parsing with a highlighted error position and subtle purple accents
Oskar Stark

PHP 8.6: JSON Decode Error Position

PHP 8.6 adds a small but useful improvement to JSON decoding: you can now get the exact error position when parsing fails. That makes debugging malformed payloads much faster.

Read more : PHP 8.6: JSON Decode Error Position
A man sculpting a rock with PDF written on it
Steven Renaux

Create a Custom Builder - A GotenbergBundle Story

In a previous article, we explored how to generate your first PDF in a few lines of code using Gotenberg and GotenbergBundle, a Symfony bundle that wraps Gotenberg's HTTP API to convert HTML or Office files into PDFs. That was a great start. But what happens when your application needs to generate multiple different PDFs, each with its own layout, styles, data?

Read more : Create a Custom Builder - A GotenbergBundle Story
Why PHP?
Silas Joisten

Why PHP Powers the Enterprise Web: The Strategic Advantage Companies Cannot Ignore

PHP remains one of the most reliable and cost effective backend technologies for enterprise systems.

Read more : Why PHP Powers the Enterprise Web: The Strategic Advantage Companies Cannot Ignore
PHP 8.5 URI extension
Oskar Stark

PHP 8.5's New URI Extension: A Game-Changer for URL Parsing

PHP 8.5 introduces a powerful new URI extension that modernizes URL handling. With support for both RFC 3986 and WHATWG standards, the new Uri class provides immutable objects, fluent interfaces, and proper validation - addressing all the limitations of the legacy parse_url() function. This guide shows practical before/after examples and explains when to use each standard.

Read more : PHP 8.5's New URI Extension: A Game-Changer for URL Parsing
3 dog heads
Mathieu Santostefano

Bring Your Own HTTP client

Break free from rigid dependencies in your PHP SDKs. Learn how to use PSR-7, PSR-17, and PSR-18 standards along with php-http/discovery to allow users to bring their favorite HTTP client, whether it's Guzzle, Symfony HttpClient, or another. A must-read for PHP and Symfony developers.

Read more : Bring Your Own HTTP client
PHP 8.5
Oskar Stark

What's New in PHP 8.5: A Comprehensive Overview

PHP 8.5 will be released in November 2025 and brings several useful new features and improvements. This version focuses on developer experience enhancements, new utility functions, and better debugging capabilities.

Read more : What's New in PHP 8.5: A Comprehensive Overview
the surface of the earth seen from the space with city lights forming networks
Imen Ezzine

HTTP Verbs: Your Ultimate Guide

HTTP Verbs Explained: Learn the basics of GET, POST, PUT, DELETE, and more. This article explains how they work, their applications, and their security implications.

Read more : HTTP Verbs: Your Ultimate Guide