Laravel Idea for PhpStorm - Full-featured IDE for productive artisans!

PIE (PHP Installer for Extensions)

Last updated on by

PIE (PHP Installer for Extensions) image

PHP comes with quite a number of core extensions already included, and some additional extensions can be installed through an OS package manager, such as Apt, Yum, Homebrew, etc, on Linux and MacOS or as precompiled binaries on Windows. However, sometimes, you need to install other extensions that might still need to be precompiled and available via those options. In those instances, you would need to utilize something like PECL or compile the extension manually from the source.

The PHP Foundation has recently introduced a pre-release of the PHP Installer for Extensions (PIE). PIE aims to simplify managing PHP extensions by providing a modern, flexible alternative to PECL and treating extensions as first-class citizens in the PHP ecosystem.

The whole point of this project is to help make the process of managing PHP extensions more streamlined. Now, extensions can be distributed via Packagist, just like regular PHP packages! As a result, the installation and update process of extensions will be quite familiar to developers who already use Composer.

Note that as of the writing of this article, this project is still in active development, and there is an initial pre-release that is stable and available as a PHAR download. You will also need PHP 8.1 or newer to run PIE, but PIE can install an extension to any installed PHP version. The PHP Foundation is inviting developers to try it and share feedback.

Assuming you have moved pie.phar into your $PATH, e.g. /usr/local/bin/pie on non-Windows systems, you can install your extension with:

pie install <vendor>/<package>
 
# for example:
pie install xdebug/xdebug

If you are an extension author, your extensions will need to be made compatible with PIE by adding a composer.json file and publishing it on Packagist. Further instructions have been shared on how to make your packages compatible. Once that is followed, it will appear on the Packagist Extensions list page.

To learn more about this tool, you can read the usage docs and view the source code at the official PIE Github repository.

Yannick Lyn Fatt photo

Research Assistant at Laravel News and Full stack web developer.

Filed in:
Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
Curotec

Curotec helps software teams hire the best Laravel developers in Latin America. Click for rates and to learn more about how it works.

Visit Curotec
Curotec logo

Curotec

World class Laravel experts with GenAI dev skills. LATAM-based, embedded engineers that ship fast, communicate clearly, and elevate your product. No bloat, no BS.

Curotec
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $2500/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Laravel Forge logo

Laravel Forge

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Forge
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Cut PHP Code Review Time & Bugs into Half with CodeRabbit logo

Cut PHP Code Review Time & Bugs into Half with CodeRabbit

CodeRabbit is an AI-powered code review tool that specializes in PHP and Laravel, running PHPStan and offering automated PR analysis, security checks, and custom review features while remaining free for open-source projects.

Cut PHP Code Review Time & Bugs into Half with CodeRabbit
Join the Mastering Laravel community logo

Join the Mastering Laravel community

Connect with experienced developers in a friendly, noise-free environment. Get insights, share ideas, and find support for your coding challenges. Join us today and elevate your Laravel skills!

Join the Mastering Laravel community
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
MongoDB logo

MongoDB

Enhance your PHP applications with the powerful integration of MongoDB and Laravel, empowering developers to build applications with ease and efficiency. Support transactional, search, analytics and mobile use cases while using the familiar Eloquent APIs. Discover how MongoDB's flexible, modern database can transform your Laravel applications.

MongoDB

The latest

View all →
Laravel Simple RabbitMQ Package image

Laravel Simple RabbitMQ Package

Read article
Navigating Dates Elegantly with Carbon in Laravel image

Navigating Dates Elegantly with Carbon in Laravel

Read article
Memoized Cache Driver in Laravel 12.9 image

Memoized Cache Driver in Laravel 12.9

Read article
Laravel Cookie Consent image

Laravel Cookie Consent

Read article
Converting Non-Decimal Strings with Laravel's Enhanced toInteger() Method image

Converting Non-Decimal Strings with Laravel's Enhanced toInteger() Method

Read article
Herd Xdebug Toggler for Visual Studio Code image

Herd Xdebug Toggler for Visual Studio Code

Read article