-
Notifications
You must be signed in to change notification settings - Fork 276
Description
Your client library and Google Ads API versions:
- Client library version:
v26.2.0
- Google Ads API version:
V19
Your environment:
================= PHP GENERAL INFORMATION
================= PHP EXTENSION INFORMATION
The PHP Extension grpc is installed: 1.74.0
The PHP Extension protobuf is not installed
print php_uname();
Linux 24e1eca990a3 6.10.14-linuxkit #1 SMP Thu Oct 24 19:28:55 UTC 2024 aarch64
Description of the bug:
The docs say SDK v26.2 is pointing at API 19.1, but in testing I am getting errors saying requests are missing the required field contains_eu_political_advertising on all campaigns.
Composer shows `googleapis/gax-php v1.25.0 is installed, which I'm guessing points at v1.19.2
Git history on googleapis/gax-php shows they never released v1.19.2, they went from 1.19.1 to 1.20.0 https://github.com/googleapis/gax-php/releases?page=5
Your composer.json specifies "google/gax": "^1.19.1", which is equivalent to >=1.19.1 <2.0.0
So I think this is a bug with your composer.json where you need to pin gax-php to a compatible version range for each SDK release, for example Tilde versioning would work: ~1.19.1 is equivalent to >=1.19.1 <1.20.0
Either that or this a bug with googleapis/gax-php where they broke backwards compatibility.
Steps to reproduce:
Expected behavior:
Request/Response Logs:
Request
-------
Method Name: /google.ads.googleads.v19.services.CampaignService/MutateCampaigns
Host: googleads.googleapis.com
Headers: {
"x-goog-api-client": "gl-php\/8.4.17 gccl\/26.2.0 gapic\/26.2.0 gax\/1.25.0 grpc\/1.74.0 rest\/1.25.0 pb\/+n",
"User-Agent": "gcloud-php-new\/26.2.0",
"x-goog-request-params": "customer_id=3333839952",
"developer-token": "REDACTED",
"login-customer-id": "5793639464"
}
Request:
{"customerId":"3333839952","operations":[{"create":{"name":"Counselor Storefront|optintester-optintester|4045|Canada",
"status":"PAUSED","advertisingChannelType":"SEARCH","trackingUrlTemplate":"{lpurl}?utm_source=AdWords&utm_campaign=sto
refront&utm_term={keyword}_{matchtype}&utm_content=optintester-optintester_4045","networkSettings":{"targetGoogleSearc
h":true,"targetSearchNetwork":false,"targetContentNetwork":false,"targetPartnerSearchNetwork":false},"geoTargetTypeSet
ting":{"positiveGeoTargetType":"PRESENCE","negativeGeoTargetType":"PRESENCE"},"campaignBudget":"customers\/3333839952\
/campaignBudgets\/15317210137","manualCpc":{}}}]}
Response
-------
Headers: {
"request-id": "9uYK9KG1kobt4QfJ7oBXog",
"date": "Thu, 22 Jan 2026 18:04:15 GMT",
"alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000"
}
Fault
-------
Status code: 3
Details: Request contains an invalid argument.
Failure: {"errors":[{"errorCode":{"fieldError":"REQUIRED"},"message":"The required field was not present.","location":
{"fieldPathElements":[{"fieldName":"operations","index":0},{"fieldName":"create"},{"fieldName":"contains_eu_political_
advertising"}]}}],"requestId":"9uYK9KG1kobt4QfJ7oBXog"}
"errfile": "\/srv\/www\/private\/vendor\/googleads\/google-ads-php\/src\/Google\/Ads\/GoogleAds\/Lib\/V19\/GoogleA
dsCallLogger.php",
"errline": 146,
Anything else we should know about your project / environment: