Introduction to PIE (PHP Installer for Extensions)
PIE, an acronym for PHP Installer for Extensions, is a tool designed for PHP developers to conveniently install extensions to any PHP version they have installed. The key requirement for using PIE is that the system must have PHP 8.1 or newer, though PIE itself can manage extensions for various PHP versions that users might have.
Installing PIE
PIE offers a straightforward installation process. Users can opt for a manual installation, which involves downloading the 'pie.phar' file. There are two versions available: the latest stable release and the latest unstable nightly version. After downloading, users should validate the signature in 'pie.phar.asc' to ensure authenticity and security.
Once downloaded and validated, users can execute PIE using the command php pie.phar <command>
. It is recommended to move 'pie.phar' into your system's $PATH
, for example, into /usr/local/bin/pie
on non-Windows operating systems. Detailed installation instructions and usage guidelines are available in the usage documentation.
Extensions Supported by PIE
PIE has an expanding repository of extensions that users can easily browse and access. The complete list of extensions compatible with PIE is hosted at Packagist's extensions section, providing developers with a centralized resource to find and install desired extensions.
Installing an Extension with PIE
Using PIE to install a PHP extension is simplified with the install
command. For instance, to install an extension named example_pie_extension
, one would execute the command:
$ pie install example/example-pie-extension
This process might require administrative privileges, and users might be prompted for their password during execution. The terminal output will provide useful information about the PHP environment and the status of the installation process. After installation, users need to manually update the php.ini
file to activate the extension by adding the line extension=example_pie_extension
.
Additional Documentation
For those seeking further guidance and information, the comprehensive documentation for using PIE is accessible in the usage section. This documentation offers detailed insights into advanced features and troubleshooting tips, ensuring that both beginners and advanced users can maximize their use of PIE.