Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with php 8.0.2 #541

Closed
apideveloper721 opened this issue Feb 26, 2021 · 10 comments
Closed

Issue with php 8.0.2 #541

apideveloper721 opened this issue Feb 26, 2021 · 10 comments
Assignees
Labels
bug Something isn't working in progress Currently being worked on

Comments

@apideveloper721
Copy link

What versions of the client library and Google Ads API are you using?
v7.0.0

What environment are you using?
PHP Version 8.0.2
Windows NT DESKTOP-GAF2GFK 10.0 build 18363 (Windows 10) AMD64
gRPC 1.35.0
The PHP Extension grpc is installed: 1.35.0
The PHP Extension protobuf is not installed

Actions taken
Running reporting example

Expected result
Rows with data
Actual result
Deprecated: Required parameter $continuation follows optional parameter $metadata in \google-ads-php\src\Google\Ads\GoogleAds\Lib\V6\GoogleAdsFailuresInterceptor.php on line 41

Deprecated: Required parameter $continuation follows optional parameter $metadata in \google-ads-php\vendor\grpc\grpc\src\lib\Interceptor.php on line 30

Deprecated: Required parameter $continuation follows optional parameter $metadata in \google-ads-php\vendor\grpc\grpc\src\lib\Interceptor.php on line 41

Deprecated: Required parameter $continuation follows optional parameter $metadata in \google-ads-php\vendor\grpc\grpc\src\lib\Interceptor.php on line 51

Deprecated: Required parameter $continuation follows optional parameter $metadata in \google-ads-php\vendor\grpc\grpc\src\lib\Interceptor.php on line 62

Deprecated: Required parameter $continuation follows optional parameter $metadata in \google-ads-php\src\Google\Ads\GoogleAds\Lib\V6\GoogleAdsLoggingInterceptor.php on line 53

Deprecated: Required parameter $continuation follows optional parameter $metadata in \google-ads-php\src\Google\Ads\GoogleAds\Lib\V6\GoogleAdsLoggingInterceptor.php on line 83

Anything else we should know about your project / environment
XAMPP with PHP 8.0.2

@apideveloper721 apideveloper721 added the bug Something isn't working label Feb 26, 2021
@PierrickVoulet
Copy link
Collaborator

PHP 8.0 is still not totally supported, please follow #479 for progress.

@PierrickVoulet PierrickVoulet self-assigned this Feb 26, 2021
@PierrickVoulet PierrickVoulet added the in progress Currently being worked on label Feb 26, 2021
@apideveloper721
Copy link
Author

HI @PierrickVoulet ,

ok, I got.

But I am in situation that I upgraded to php8.0, but I cannot downgrade now.
I will wait for it.

Thank You.

@PierrickVoulet
Copy link
Collaborator

Sorry to hear that. We are working on #530 which should address this issue but it requires the version 1.36 of grpc/grpc-php to be released. This should happen fairly soon but if you cannot wait then you may want to give it a try and patch in the meantime.

@apideveloper721
Copy link
Author

Hi @PierrickVoulet ,

Yes, I have update the patch upstream/PierrickVoulet-patch-22, but getting same issue. I think I need to look deep or need to wait for grpc 1.36 version.

Deprecated: Required parameter $continuation follows optional parameter $metadata in \google-ads-php\vendor\grpc\grpc\src\lib\Interceptor.php on line 30

Deprecated: Required parameter $continuation follows optional parameter $metadata in \google-ads-php\vendor\grpc\grpc\src\lib\Interceptor.php on line 41

Deprecated: Required parameter $continuation follows optional parameter $metadata in \google-ads-php\vendor\grpc\grpc\src\lib\Interceptor.php on line 51

Deprecated: Required parameter $continuation follows optional parameter $metadata in \google-ads-php\vendor\grpc\grpc\src\lib\Interceptor.php on line 62

@PierrickVoulet
Copy link
Collaborator

@apideveloper721 grpc/grpc-php 1.36.0 was just released and #530 unit tests seem to pass now. I will run more tests before merging the fix but feel free to give it a try on your end in the meantime.

@apideveloper721
Copy link
Author

Yes, seems to be Deprecated: Required parameter $continuation follows optional parameter $metadata , error is removed.
I will check with other data and let you know.

Thanks,

@apideveloper721
Copy link
Author

@PierrickVoulet ,
Yes, It is working in most of my cases used till now.

@apideveloper721
Copy link
Author

Hi @PierrickVoulet ,

I am not able to pause the placement added to the account.
I feel it is due to the this recent changes.

$adGroupCriterion = new AdGroupCriterion([
                    'resource_name' => ResourceNames::forAdGroupCriterion(
                        $customerId,
                        $adGroupId,
                        $CriterionId
                    ),
                    'status' => AdGroupCriterionStatus::PAUSED
                ]);

                
                $adGroupCriterionOperation = new AdGroupCriterionOperation();
                $adGroupCriterionOperation->setUpdate($adGroupCriterion);
                $adGroupCriterionOperation->setUpdateMask(FieldMasks::allSetFieldsOf($adGroupCriterion));

                $adGroupCriterionServiceClient = $googleAdsClient->getAdGroupCriterionServiceClient();
                $response = $adGroupCriterionServiceClient->mutateAdGroupCriteria(
                    $customerId,
                    [$adGroupCriterionOperation]
                );

$updatedAdGroupCriterion = $response->getResults()[0];
                printf(
                    "Updated ad group criterion with resource name: '%s'%s",
                    $updatedAdGroupCriterion->getResourceName(),
                    PHP_EOL
                );

It is not giving any error also not changing the criteria in the account.

The response is giving issue with protobuf.

google-ads.INFO: Request made: Host: "googleads.googleapis.com", Method: "/google.ads.googleads.v6.services.AdGroupCriterionService/MutateAdGroupCriteria", CustomerId: XXXX, RequestId: "oXJaArKK2zLLeVPxMQHGgA", IsFault: 0, FaultMessage: "None"

@apideveloper721
Copy link
Author

Sorry. It is worked now. I figured out the issue.
Video campaigns are not allowed for update.

@PierrickVoulet
Copy link
Collaborator

We just released the version v8.0.0: It fully supports PHP 8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress Currently being worked on
Projects
None yet
Development

No branches or pull requests

2 participants