Introducing PIE: The Modern PHP Extension Installer

· Oskar Stark · 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

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
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
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
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
2025 a year of celebrations for PHP with windows about API Platform, PHP, AFUP and Symfony
Jules Daunay

2025: a year of anniversaries for PHP, AFUP, Symfony and API Platform

2025 is going to be a big year for anniversaries. We will be celebrating the 20th anniversary of Symfony, the 30th anniversary of PHP, the 25th anniversary of AFUP and the 10th anniversary of API Platform. For SensioLabs, this is a major milestone that proves the longevity of the technologies in our ecosystem. We are proud to celebrate these anniversaries with the community all year long.

Read more
Blue ElePHPant on a computer
Imen Ezzine

Optimize Your PHP Code: 8 Functions You Need for Efficient Table Handling

If you want to become a good PHP developer, you must learn to work with arrays. Arrays are used a lot in PHP: temporarily store, organize, and process data before it's saved in a database. Knowing how to work with them efficiently will help you manage and process data more effectively.

Read more
SymfonyLive 2024
Jules Daunay

SymfonyLive Paris 2024: Two Days of Conference and Fun.

On March 28th and 29th, the SensioLabs team and the French-speaking Symfony community gathered at the Cité Internationale Universitaire in Paris for SymfonyLive Paris 2024. Were you not at this must-attend event? We’ll summarize it for you, but only because it’s you!

Read more
Some speaker
Jules Daunay

Discover our Symfony events in February 2024

February was a busy month for SensioLabs regarding events related to Symfony. We attended Symfony meetups and conferences in France, Switzerland, England and finally Canada. We invite you to join us in this article for our review of February. Enjoy reading!

Read more
Image