[php][ext] Supports PIE
Supports The PHP Installer for Extensions (PIE)
https://github.com/php/pie/blob/1.4.x/docs/extension-maintainers.md
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
Please sign the CLA before we can review your PR.
Does this impact the non-extension php library? The php/ directory publishes both a pure PHP composer library, and under php/ext/google/protobuf has the C extension. I would have expected us to have 2 separate composer projects to support the two separate artifacts.
hello @zhangskz I signed the CLA
Does this impact the non-extension php library? The
php/directory publishes both a pure PHP composer library, and underphp/ext/google/protobufhas the C extension. I would have expected us to have 2 separate composer projects to support the two separate artifacts.
I don't think there is any impact on the existing php library but I will double check with the PIE's core contributors.
Due to the way Packagist works, you can only have EITHER a PHP library, OR a PIE extension in a project's composer.json. This would therefore break the existing PHP library.
This has been brought up before: php/pie#261
The solution, as far as I can tell, is to have a separate repo for the PHP library and PIE extension components.
Thanks @asgrim , that's a nonstarter for this PR then. We will take a look at some other options.
Thanks @asgrim , that's a nonstarter for this PR then. We will take a look at some other options.
I just did some exploring, and was confused how the PHP library even works at the moment (since Packagist looks for the root composer.json, which doesn't exist in this repo); then I discovered it is actually split/mirrored: https://github.com/protocolbuffers/protobuf-php
You could potentially take a similar approach and split/mirror the subdirectory; https://github.com/protocolbuffers/protobuf/tree/main/php/ext/google/protobuf (which could have its own composer.json similar to what is proposed).