-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated main README to reference ext maintainer doc
- Loading branch information
Showing
1 changed file
with
28 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,48 @@ | ||
# 🥧 PIE (PHP Installer for Extensions) | ||
|
||
You will need PHP 8.1 or newer to run PIE, but PIE can install an extension to any installed PHP version. | ||
You will need PHP 8.1 or newer to run PIE, but PIE can install an extension to | ||
any installed PHP version. | ||
|
||
## Installing | ||
If you are an extension maintainer wanting to add PIE support to your extension, | ||
please read [extension-maintainers](./docs/extension-maintainers.md). | ||
|
||
## Usage | ||
## Installing an extension using PIE | ||
|
||
You can download an extension ready to be built or installed using the `download` command. For example, to download the | ||
`example_pie_extension` extension, you would run: | ||
You can install an extension using the `install` command. For example, to | ||
install the `example_pie_extension` extension, you would run: | ||
|
||
```shell | ||
$ bin/pie download asgrim/example-pie-extension | ||
You are running PHP 8.3.7 | ||
Target PHP installation: 8.3.7 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.3) | ||
$ bin/pie install asgrim/example-pie-extension | ||
This command may need elevated privileges, and may prompt you for your password. | ||
You are running PHP 8.3.10 | ||
Target PHP installation: 8.3.10 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.3) | ||
Found package: asgrim/example-pie-extension:1.0.1 which provides ext-example_pie_extension | ||
Extracted asgrim/example-pie-extension:1.0.1 source to: /tmp/pie_downloader_6645f07a28bec9.66045489/asgrim-example-pie-extension-769f906 | ||
$ | ||
phpize complete. | ||
Configure complete. | ||
Build complete: /tmp/pie_downloader_66e0b1de73cdb6.04069773/asgrim-example-pie-extension-769f906/modules/example_pie_extension.so | ||
Install complete: /usr/lib/php/20230831/example_pie_extension.so | ||
You must now add "extension=example_pie_extension" to your php.ini | ||
$ | ||
``` | ||
|
||
If you are trying to install an extension for a different version of PHP, you may specify this on non-Windows systems | ||
with the `--with-php-config` option like: | ||
### Using PIE to install an extension for a different PHP version | ||
|
||
```shell | ||
bin/pie download --with-php-config=/usr/bin/php-config7.2 my/extension | ||
``` | ||
|
||
On all platforms, you may provide a path to the `php` executable itself using the `--with-php-path` option. This is an | ||
example on Windows where PHP 8.1 is used to run PIE, but we want to download the extension for PHP 8.3: | ||
If you are trying to install an extension for a different version of PHP, you | ||
may specify this on non-Windows systems with the `--with-php-config` option: | ||
|
||
```shell | ||
> C:\php-8.1.7\php.exe bin/pie download --with-php-path=C:\php-8.3.6\php.exe asgrim/example-pie-extension | ||
You are running PHP 8.1.7 | ||
Target PHP installation: 8.3.6 ts, vs16, on Windows x86_64 (from C:\php-8.3.6\php.exe) | ||
Found package: asgrim/example-pie-extension:1.0.1 which provides ext-example_pie_extension | ||
Extracted asgrim/example-pie-extension:1.0.1 source to: C:\path\to\temp\pie_downloader_66547faa7db3d7.06129230 | ||
bin/pie install --with-php-config=/usr/bin/php-config7.2 my/extension | ||
``` | ||
|
||
And this is a very similar example (using PHP 8.1 to run PIE to download a PHP 8.3 extension) on a non-Windows platform: | ||
On Windows, you may provide a path to the `php` executable itself using the | ||
`--with-php-path` option. This is an example on Windows where PHP 8.1 is used | ||
to run PIE, but we want to download the extension for PHP 8.3: | ||
|
||
```shell | ||
$ php8.1 bin/pie download --with-php-path=/usr/bin/php8.3 asgrim/example-pie-extension | ||
You are running PHP 8.1.28 | ||
Target PHP installation: 8.3.7 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.3) | ||
Found package: asgrim/example-pie-extension:1.0.1 which provides ext-example_pie_extension | ||
Extracted asgrim/example-pie-extension:1.0.1 source to: /tmp/pie_downloader_66547da1e6c685.25242810/asgrim-example-pie-extension-769f906 | ||
> C:\php-8.3.6\php.exe bin/pie install --with-php-path=C:\php-8.1.7\php.exe asgrim/example-pie-extension | ||
``` | ||
|
||
## Developing | ||
|
||
### Testing | ||
## Extensions that support PIE | ||
|
||
### Building and Deploying | ||
A list of extensions that support PIE can be found on | ||
[https://packagist.org/extensions](https://packagist.org/extensions). |