protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

BC Math extension should be a hard requirement

Open tab1293 opened this issue 5 years ago • 4 comments

Right now ext-bcmath is listed as a suggested dependency in composer.json but it should be a hard dependency.

Using timestamps in any protobuf definition requires that this extension be installed: https://github.com/protocolbuffers/protobuf-php/blob/master/src/Google/Protobuf/Internal/GPBUtil.php#L461

tab1293 avatar Mar 07 '19 20:03 tab1293

If you use c extension or don't use json parsing, you don't need that.

TeBoring avatar Mar 11 '19 23:03 TeBoring

If you use c extension or don't use json parsing, you don't need that.

Bo, I just recently got complaints in my library too. As this composer.json is usually consumed by other PHP projects that specify this library as their dependencies (i.e., using PHP extension, not C extension), shouldn't we specify that in composer.json?

fiboknacky avatar Jan 14 '20 16:01 fiboknacky

@TeBoring looking at the code, it looks like bcmath is needed for a lot more than JSON parsing when using a 32bit version of PHP.

stof avatar Jan 22 '21 16:01 stof

If you use c extension or don't use json parsing, you don't need that.

I have c implementation still facing issue in Google Ads Lib

Message: Call to undefined function Google\Protobuf\Internal\bccomp()

Thanks,

chiragvels avatar May 31 '22 09:05 chiragvels

duplicate: https://github.com/protocolbuffers/protobuf/issues/4465

esorot avatar Sep 01 '22 17:09 esorot