From d603b4199e42d18a6ed433f47bdf8e5042900588 Mon Sep 17 00:00:00 2001 From: Brett McBride Date: Fri, 7 Jul 2023 10:08:55 -0700 Subject: [PATCH] adding provide to php composer.json (#13141) 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=https://github.com/protocolbuffers/protobuf/pull/13141 from brettmc:php-provides-ext 72d3e447f3c0dbf2f64630f31f25678f31b60673 PiperOrigin-RevId: 546312826 --- php/composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/php/composer.json b/php/composer.json index c00d686fc624..8412c7ce7ab1 100644 --- a/php/composer.json +++ b/php/composer.json @@ -8,6 +8,9 @@ "require": { "php": ">=8.0.0" }, + "provide": { + "ext-protobuf": "*" + }, "require-dev": { "phpunit/phpunit": ">=5.0.0 <8.5.27" },