[PHP] - add support for PIE command
Description
There is a new way to install an extension for PHP via the pie command. It's a replacement for the old pecl command. It would be good to have support for it. See https://github.com/php/pie.
Additional context
see https://github.com/php/pie/blob/main/docs/extension-maintainers.md.
pie install google/ext-protobuf
The issue also exists for gRPC ext, see https://github.com/grpc/grpc/issues/38209
I notice PIE is experimental at the moment:
Warning
PIE is still in early development. We welcome you to try this out, but please exercise caution when using PIE, as things may go wrong! If you do encounter issues, please do report an issue!
We probably wouldn't officially support this tool while it is still experimental. But I think we could accept a PR for best-effort support.
If I'm understanding correctly, this would mainly involve:
- Modifying composer.json.dist appropriately
- Copying the files for the PHP extension to the https://github.com/protocolbuffers/protobuf-php repo at release time. This would be a change to the script here: https://github.com/protocolbuffers/protobuf/blob/main/php/release.sh
It's a pre-release version supported and maintained by The PHP Foundation, see https://thephp.foundation/blog/2024/11/19/pie-pre-release/. Many extensions already support PIE, see https://github.com/php/pie/blob/main/docs/supported-extensions.md or https://packagist.org/extensions.
The new composer.json must be added for the code written in C (PHP extension) https://github.com/protocolbuffers/protobuf/tree/main/php/ext/google/protobuf
@haberman version 1.0.0 has been officially released https://github.com/php/pie/releases/tag/1.0.0
@vencakrecl Could you maybe create the PR?
There's some PRs going out in php-src to start removing PECL. If I open a PR adding a simple composer.json for the extension, will y'all manage https://github.com/php/pie/blob/main/docs/extension-maintainers.md#submit-the-extension-to-packagist?