Problem/Motivation
Google analytics counter 4.x depends on Google\Protobuf which only suggest dependency to bcmath php-extention.
Steps to reproduce
On a server that doesn't have extbcmath installed
Install and enable google analytics counter
Setup api authentification
Run google_analytics_counter cron job
(can also be done using drush ev 'google_analytics_counter_cron()')
This will lead to :
[error] Error: Call to undefined function Google\Protobuf\Internal\bccomp() in Google\Protobuf\Internal\Message->convertJsonValueToProtoValue() (line 961 of /var/www/public_html/vendor/google/protobuf/src/Google/Protobuf/Internal/Message.php)
Proposed resolution
Google analytics counter indeed needs bcmath to run so i suggest that we had ext bcmath as as a requirement for this module.
Mention that dependency on module's page
Comments
Comment #2
kaszarobertThanks for reporting it! I was not aware that the php-analytics-data library does not specify their dependencies properly. As I found that https://github.com/googleapis/google-cloud-php/issues/2400
So they are using 2 PHP Extensions but don't set dependencies for them (facepalm). And they are not even planning to set it in the future. I guess, I have to add that into this module's composer.json.
Comment #4
kaszarobertI updated the module' composer.json.
Comment #5
kaszarobertI updated the docs to mention this thing https://www.drupal.org/docs/contributed-modules/google-analytics-counter...
Comment #6
ericdsd commentedThat was fast ! Thanks