Skip to content

Commit 741f1ff

Browse files
committed
Review and update docs ready for 1.4.0 release
1 parent 220ab08 commit 741f1ff

File tree

2 files changed

+81
-68
lines changed

2 files changed

+81
-68
lines changed

README.md

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ You will need PHP 8.1 or newer to run PIE, but PIE can install an extension to
1717
any other installed PHP version.
1818

1919
On Linux/OSX, if any build tools needed are missing, PIE will ask if you would
20-
like to automatically install them first (this is a new feature in 1.4.0).
20+
like to automatically install them first (as of PIE 1.4.0).
2121

2222
On Windows, you do not need any build toolchain installed, since PHP extensions
2323
for Windows are distributed as pre-compiled packages containing the extension
@@ -35,6 +35,17 @@ Further installation details can be found in the [usage](./docs/usage.md) docs.
3535
This documentation assumes you have moved `pie.phar` into your `$PATH`, e.g.
3636
`/usr/local/bin/pie` on non-Windows systems or created an alias in your shell RC file.
3737

38+
### One-liner
39+
40+
This will install PIE into `/usr/local/bin/pie` on a non-Windows system:
41+
42+
```shell
43+
curl -fL --output /tmp/pie.phar https://github.com/php/pie/releases/latest/download/pie.phar \
44+
&& gh attestation verify --owner php /tmp/pie.phar \
45+
&& sudo mv /tmp/pie.phar /usr/local/bin/pie \
46+
&& sudo chmod +x /usr/local/bin/pie
47+
```
48+
3849
## Using PIE
3950

4051
### Installing a single extension using PIE
@@ -44,15 +55,17 @@ install the `example_pie_extension` extension, you would run:
4455

4556
```shell
4657
$ pie install asgrim/example-pie-extension
58+
🥧 PHP Installer for Extensions (PIE) 1.4.0, from The PHP Foundation
4759
This command may need elevated privileges, and may prompt you for your password.
48-
You are running PHP 8.3.10
49-
Target PHP installation: 8.3.10 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.3)
50-
Found package: asgrim/example-pie-extension:1.0.1 which provides ext-example_pie_extension
60+
You are running PHP 8.5.3
61+
Target PHP installation: 8.5.3 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.5)
62+
Found package: asgrim/example-pie-extension:2.0.9 which provides ext-example_pie_extension
63+
Extracted asgrim/example-pie-extension:2.0.9 source to: /path/to/example-pie-extension
5164
phpize complete.
52-
Configure complete.
53-
Build complete: /tmp/pie_downloader_66e0b1de73cdb6.04069773/asgrim-example-pie-extension-769f906/modules/example_pie_extension.so
54-
Install complete: /usr/lib/php/20230831/example_pie_extension.so
55-
You must now add "extension=example_pie_extension" to your php.ini
65+
Configure complete with options: --with-php-config=/usr/bin/php-config8.5
66+
Build complete: /path/to/example-pie-extension/modules/example_pie_extension.so
67+
Install complete: /usr/lib/php/20250925/example_pie_extension.so
68+
✅ Extension is enabled and loaded in /usr/bin/php8.5
5669
$
5770
```
5871

@@ -62,26 +75,26 @@ When in your PHP project, you can install any missing top-level extensions:
6275

6376
```
6477
$ pie install
65-
🥧 PHP Installer for Extensions (PIE), 0.9.0, from The PHP Foundation
66-
You are running PHP 8.3.19
67-
Target PHP installation: 8.3.19 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.3)
68-
Checking extensions for your project your-vendor/your-project
69-
requires: curl ✅ Already installed
70-
requires: intl ✅ Already installed
71-
requires: json ✅ Already installed
72-
requires: example_pie_extension ⚠️ Missing
73-
74-
The following packages may be suitable, which would you like to install:
78+
🥧 PHP Installer for Extensions (PIE) 1.4.0, from The PHP Foundation
79+
You are running PHP 8.5.0
80+
Target PHP installation: 8.5.0 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
81+
Checking extensions for your project asgrim/demo-php-project (path: /demos/demo-php-project)
82+
requires: ext-curl:* ✅ Already installed
83+
requires: ext-example_pie_extension:^2.0 🚫 Missing
84+
85+
The following packages may be suitable, which would you like to install:
7586
[0] None
7687
[1] asgrim/example-pie-extension: Example PIE extension
7788
> 1
78-
> 🥧 PHP Installer for Extensions (PIE), 0.9.0, from The PHP Foundation
79-
> This command may need elevated privileges, and may prompt you for your password.
80-
> You are running PHP 8.3.19
81-
> Target PHP installation: 8.3.19 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.3)
82-
> Found package: asgrim/example-pie-extension:2.0.2 which provides ext-example_pie_extension
83-
... (snip) ...
84-
> ✅ Extension is enabled and loaded in /usr/bin/php8.3
89+
example_pie_extension> You are running PHP 8.5.0
90+
example_pie_extension> Target PHP installation: 8.5.0 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
91+
example_pie_extension> Found package: asgrim/example-pie-extension:2.0.9 which provides ext-example_pie_extension
92+
example_pie_extension> Extracted asgrim/example-pie-extension:2.0.9 source to: /path/to/example-pie-extension
93+
example_pie_extension> phpize complete.
94+
example_pie_extension> Configure complete with options: --with-php-config=/usr/local/bin/php-config
95+
example_pie_extension> Build complete: /path/to/example-pie-extension/modules/example_pie_extension.so
96+
example_pie_extension> Install complete: /usr/local/lib/php/extensions/no-debug-non-zts-20250925/example_pie_extension.so
97+
example_pie_extension> ✅ Extension is enabled and loaded in /usr/local/bin/php
8598
8699
Finished checking extensions.
87100
```

docs/usage.md

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,6 @@ order: 2
1818
This documentation assumes you have moved `pie.phar` into your `$PATH`, e.g.
1919
`/usr/local/bin/pie` on non-Windows systems.
2020

21-
### One-liner
22-
23-
Note that this does not verify any signatures, and you assume the risks in
24-
running this, but this will put PIE into `/usr/local/bin/pie` on a non-Windows
25-
system:
26-
27-
```shell
28-
curl -fL --output /tmp/pie.phar https://github.com/php/pie/releases/latest/download/pie.phar \
29-
&& gh attestation verify --owner php /tmp/pie.phar \
30-
&& sudo mv /tmp/pie.phar /usr/local/bin/pie \
31-
&& sudo chmod +x /usr/local/bin/pie
32-
```
33-
3421
### Distribution packages
3522

3623
> [!WARNING]
@@ -108,27 +95,37 @@ As of 1.4.0 an **experimental** executable (binary) version of PIE is included.
10895
The PIE is built using [Static PHP](https://static-php.dev/), which builds a
10996
self-contained PHP executable with the extensions that PIE needs to run, and
11097
bundles the PHAR as a single distributable executable. Please keep in mind that
111-
this is **experimental** and we do not recommend this for production use for
98+
this is **experimental**, and we do not recommend this for production use for
11299
the time being. Please also note there are some limitations:
113100

114-
- [php/pie#459](https://github.com/php/pie/discussions/459) - the OSX version
115-
is not signed with an Apple Developer account, which means (at your own risk)
116-
you would need to tell your system to trust the downloaded executable.
117101
- [php/pie#460](https://github.com/php/pie/discussions/460) - all the binary
118102
versions have the `pie self-update` feature disabled for now.
119103

120104
If you find the binary releases useful, please leave feedback or upvote on the
121105
relevant discussions, so we can gauge interest in improving this functionality.
122106

107+
The stable versions of the executables can be found by navigating to the
108+
[relevant release](https://github.com/php/pie/releases), and finding the
109+
appropriate executable for your platform. For your convenience, the "latest"
110+
stable releases can be downloaded from these links:
111+
112+
| Operating System | Architecture | Download URL |
113+
|------------------|------------------|-------------------------------------------------------------------------|
114+
| Linux | amd64 / x86_64 | https://github.com/php/pie/releases/latest/download/pie-Linux-X64 |
115+
| OS X | ARM 64 / aarch64 | https://github.com/php/pie/releases/latest/download/pie-macOS-ARM64 |
116+
| Windows | x86_64 | https://github.com/php/pie/releases/latest/download/pie-Windows-X64.exe |
117+
| Linux | ARM 64 / aarch64 | https://github.com/php/pie/releases/latest/download/pie-Linux-ARM64 |
118+
| OS X | Intel / x86_64 | https://github.com/php/pie/releases/latest/download/pie-macOS-X64 |
119+
123120
The "nightly" versions of these can be found here:
124121

125122
| Operating System | Architecture | Download URL |
126123
|------------------|------------------|-----------------------------------------------|
127-
| Linux | ARM 64 / aarch64 | https://php.github.io/pie/pie-Linux-ARM64 |
128124
| Linux | amd64 / x86_64 | https://php.github.io/pie/pie-Linux-X64 |
129125
| OS X | ARM 64 / aarch64 | https://php.github.io/pie/pie-macOS-ARM64 |
130-
| OS X | Intel / x86_64 | https://php.github.io/pie/pie-macOS-X64 |
131126
| Windows | x86_64 | https://php.github.io/pie/pie-Windows-X64.exe |
127+
| Linux | ARM 64 / aarch64 | https://php.github.io/pie/pie-Linux-ARM64 |
128+
| OS X | Intel / x86_64 | https://php.github.io/pie/pie-macOS-X64 |
132129

133130
We *highly* recommend you verify the file came from the PHP GitHub repository
134131
before running it, for example:
@@ -139,21 +136,24 @@ $ chmod +x pie-Linux-X64
139136
$ ./pie-Linux-X64 --version
140137
```
141138

142-
## Prerequisites for PIE
139+
## Prerequisites for PIE (PHAR distribution)
143140

144141
Running PIE requires PHP 8.1 or newer. However, you may still use PIE to install
145-
an extension for an older version of PHP.
142+
an extension for an older version of PHP. You also need the `zip` extension
143+
enabled for the PHP version running PIE, or `git` to download the extension
144+
source code.
146145

147-
Additionally to PHP, PIE requires the following tools to be available on your
148-
system in order to download, build and install extensions:
146+
Additionally to PHP, PIE requires the following build tools to be available on
147+
your system in order to download, build and install extensions. Note that as of
148+
PIE 1.4.0, PIE will attempt to detect and install the missing build tools:
149149

150-
- The `zip` extension enabled for the PHP version running PIE, or `git` to
151-
download the extension source code
152150
- `autoconf`, `automake`, `libtool`, `m4`, `make`, and `gcc` to build the extension
153151
- PHP development tools (such as `php-config` and `phpize`) to prepare the
154152
extension for building.
155153

156-
Also, each extension may have its own requirements, such as additional libraries.
154+
Also, each extension may have its own requirements, such as additional
155+
libraries. As of PIE 1.4.0, for some extensions, PIE will attempt to detect and
156+
install the missing system libraries.
157157

158158
> [!TIP]
159159
> If you run PIE without the correct prerequisites installed, you may receive
@@ -392,26 +392,26 @@ like to install one. For example:
392392

393393
```
394394
$ pie install
395-
🥧 PHP Installer for Extensions (PIE), 0.9.0, from The PHP Foundation
396-
You are running PHP 8.3.19
397-
Target PHP installation: 8.3.19 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.3)
398-
Checking extensions for your project your-vendor/your-project
399-
requires: curl ✅ Already installed
400-
requires: intl ✅ Already installed
401-
requires: json ✅ Already installed
402-
requires: example_pie_extension ⚠️ Missing
403-
404-
The following packages may be suitable, which would you like to install:
395+
🥧 PHP Installer for Extensions (PIE) 1.4.0, from The PHP Foundation
396+
You are running PHP 8.5.0
397+
Target PHP installation: 8.5.0 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
398+
Checking extensions for your project asgrim/demo-php-project (path: /demos/demo-php-project)
399+
requires: ext-curl:* ✅ Already installed
400+
requires: ext-example_pie_extension:^2.0 🚫 Missing
401+
402+
The following packages may be suitable, which would you like to install:
405403
[0] None
406404
[1] asgrim/example-pie-extension: Example PIE extension
407405
> 1
408-
> 🥧 PHP Installer for Extensions (PIE), 0.9.0, from The PHP Foundation
409-
> This command may need elevated privileges, and may prompt you for your password.
410-
> You are running PHP 8.3.19
411-
> Target PHP installation: 8.3.19 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.3)
412-
> Found package: asgrim/example-pie-extension:2.0.2 which provides ext-example_pie_extension
413-
... (snip) ...
414-
> ✅ Extension is enabled and loaded in /usr/bin/php8.3
406+
example_pie_extension> You are running PHP 8.5.0
407+
example_pie_extension> Target PHP installation: 8.5.0 nts, on Linux/OSX/etc x86_64 (from /usr/local/bin/php)
408+
example_pie_extension> Found package: asgrim/example-pie-extension:2.0.9 which provides ext-example_pie_extension
409+
example_pie_extension> Extracted asgrim/example-pie-extension:2.0.9 source to: /path/to/example-pie-extension
410+
example_pie_extension> phpize complete.
411+
example_pie_extension> Configure complete with options: --with-php-config=/usr/local/bin/php-config
412+
example_pie_extension> Build complete: /path/to/example-pie-extension/modules/example_pie_extension.so
413+
example_pie_extension> Install complete: /usr/local/lib/php/extensions/no-debug-non-zts-20250925/example_pie_extension.so
414+
example_pie_extension> ✅ Extension is enabled and loaded in /usr/local/bin/php
415415
416416
Finished checking extensions.
417417
```

0 commit comments

Comments
 (0)