Skip to content

Commit

Permalink
adding provide to php composer.json (#13141)
Browse files Browse the repository at this point in the history
Adding composer config to allow the native protobuf extension to provide ext-protobuf.

This allows libraries to require at least one protobuf implementation. If the extension is not available, it can be provided by the native package. If the extension is available but the native package is required, the native will be installed.

Importantly, for libraries which require at least one of them to be installed, composer will complain if neither is available.

Closes #13141

COPYBARA_INTEGRATE_REVIEW=#13141 from brettmc:php-provides-ext 72d3e44
PiperOrigin-RevId: 546312826
  • Loading branch information
brettmc authored and copybara-github committed Jul 7, 2023
1 parent 5db61db commit d603b41
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions php/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"require": {
"php": ">=8.0.0"
},
"provide": {
"ext-protobuf": "*"
},
"require-dev": {
"phpunit/phpunit": ">=5.0.0 <8.5.27"
},
Expand Down

0 comments on commit d603b41

Please sign in to comment.