protobuf
protobuf copied to clipboard
BC Math extension should be a hard requirement
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
If you use c extension or don't use json parsing, you don't need that.
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?
@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.
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,
duplicate: https://github.com/protocolbuffers/protobuf/issues/4465