Check minimal version of the installed grpc and protobuf PHP extensions
Subject Initially discussed with @emma-brainlabs and @fiboknacky in issue #403
Describe the problem you are trying to solve
Composer does not warn when the installed versions of the grpc and protobuf PHP extensions are non compliant with the requirements. This leads to unexpected C fatal errors at runtime which are difficult to investigate.
Describe the solution you would like The root issue we are facing is the limitation that composer explains here:
ext-name allows you to require PHP extensions (includes core extensions). Versioning can be quite inconsistent here, so it's often a good idea to set the constraint to *. An example of an extension package name is ext-gd.
Most of the time, problems occur when the client library has been upgraded but the PHP extensions not. This leads to the minimal version constraints of the client library dependencies not being fulfilled.
The idea would be to check for minimal versions at runtime when GoogleAdsClient is constructed. It looks like we could check the grpc module version from phpinfo for example. The maintenance should be quite low and straightforward once implemented as the minimal version constraints would be rarely edited.
Describe alternatives you've considered None.
Additional context None.