Skip to content

Basic PIE downloader flag --with-pie#21524

Draft
asgrim wants to merge 4 commits intophp:masterfrom
asgrim:add-pie-installer
Draft

Basic PIE downloader flag --with-pie#21524
asgrim wants to merge 4 commits intophp:masterfrom
asgrim:add-pie-installer

Conversation

@asgrim
Copy link
Copy Markdown
Contributor

@asgrim asgrim commented Mar 25, 2026

Adds --with-pie (or --with-pie=/pie/path) options to ./configure; this downloads PIE into the given path (defaults to $$prefix/lib/php/pie).

Fixes php/pie#564

@@ -0,0 +1,12 @@
# PIE downloader
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General question to reviewers; what is the earliest version of PHP we could get this into? PIE supports PHP 8.1+, so ideally that, but obviously it is out of support, so won't actually get any new releases. I suppose it would be PHP 8.4+?

@henderkes
Copy link
Copy Markdown
Contributor

While I'm all in for shipping pie with installations by default, I don't think build time is the place to start a download of a separate project. This seems more of a distribution issue than being related to php itself.

Also a bit weird to depend on pie, which has php as a dependency, when building php. Especially in versions that can't even run the phar.

@asgrim
Copy link
Copy Markdown
Contributor Author

asgrim commented Mar 30, 2026

While I'm all in for shipping pie with installations by default, I don't think build time is the place to start a download of a separate project. This seems more of a distribution issue than being related to php itself.

This approach is the same already taken by PEAR, so there's already a precedence for this. Note that this isn't (yet) bundled by default, you must specify --with-pie to actually get this target to do its thing. There is a slight ulterior motive here; Docker's PHP images seem unwilling to ship PIE with their images unless PIE is bundled with PHP (like PEAR/PECL was); so I'm trying to take steps towards fulfilling that goal.

Also a bit weird to depend on pie, which has php as a dependency, when building php.

This target happens after PHP is already built :)

Especially in versions that can't even run the phar.

This is actually an interesting issue; I already encountered this since PIE does not advertise compatibility with PHP 8.6 yet. The built in Box "requirements checker" will cause the pie --version to fail; I'm wondering if we can handle this a bit more gracefully, but I'm not sure if it should non-zero the whole install, or still exit 0 just with a warning that we couldn't install PIE automatically or something.

@henderkes
Copy link
Copy Markdown
Contributor

This approach is the same already taken by PEAR, so there's already a precedence for this.

Doesn't necessarily means it was or is the right decision :P

Docker's PHP images seem unwilling to ship PIE with their images unless PIE is bundled with PHP (like PEAR/PECL was);

Ah... yeah. That makes this make more sense. But I don't necessarily think it's necessary. The extension installer isn't currently bundled either, right?

COPY --from php/pie:latest /usr/local/bin/pie /usr/local/bin/pie
-> pie install imagick

should be acceptable.

And it won't have any issues in regards to old/new php versions because it could use a boxed binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bundle PIE with PHP

5 participants