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
280 stars 260 forks source link

Union Types Not Supported by PHP 7 #1032

Closed smartinec closed 2 months ago

smartinec commented 2 months ago

v23.0.0 claimed to roll back PHP 8 changes, however, some code is still using Union Types that were added in PHP 8. For example "src/Google/Ads/GoogleAds/Lib/V15/ServiceClientFactoryTrait.php" still has declarations like this:

public function getAccountBudgetProposalServiceClient(): AccountBudgetProposalServiceClient
        |\Google\Ads\GoogleAds\V15\Services\AccountBudgetProposalServiceClient

Are there any plans to remedy this issue?

smartinec commented 2 months ago

Looks like PHP 7 fix only affected V16. Can you confirm?

fiboknacky commented 2 months ago

Hello @smartinec

Sorry for your confusion. We usually don't modified the old versions, so what I wrote in the change log wasn't 100% correct. I would recommend you upgrade to the latest version (v17), so you don't need to do migration for a year.