googleads / google-ads-php

Google Ads API Client Library for PHP
https://developers.google.com/google-ads/api/docs/client-libs/php
Apache License 2.0
294 stars 262 forks source link

syntax error, unexpected '|', expecting ';' or '{' in <b>/vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Lib/V14/ServiceClientFactoryTrait.php #933

Closed jitendra-cedcoss closed 1 year ago

jitendra-cedcoss commented 1 year ago

google-ads-php with version v20.1.0:

Your environment: PHP 7.4

I was checking Upload offline conversion, but I am unable to run this API request due to the below error. syntax error, unexpected '|', expecting ';' or '{' in /vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Lib/V14/ServiceClientFactoryTrait.php

I am sharing an example url which I was trying for the offline conversion. Here is the link: https://github.com/googleads/google-ads-php/blob/3220506b528e9d590e812c641233ee92d9b486a9/examples/Remarketing/UploadOfflineConversion.php#L162-L249

https://developers.google.com/google-ads/api/docs/conversions/upload-clicks

Steps to reproduce: Just use above example in your php file and try to record upload Offline conversion

Expected behavior: API should run successfully and conversion should record.

Actual Result: Got below error syntax error, unexpected '|', expecting ';' or '{' in /vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Lib/V14/ServiceClientFactoryTrait.php

fiboknacky commented 1 year ago

We now require PHP 8.0 as a minimum PHP version for this library. Please see this issue for details.