googleads / googleads/googleads-php-lib
Deprecation errors in PHP 8.4
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 676
- Forks
- 754
- PR merge metrics
- No merged PRs in 30d
Description
Hey!
There are some updates that need to be made, to ensure compatibility with PHP 8.4 and future versions.
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\ConfigurationLoader::__construct(): Implicitly marking parameter $environmentalVariables as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/ConfigurationLoader.php on line 37
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\AdManagerSessionBuilder::fromFile(): Implicitly marking parameter $path as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/AdManagerSessionBuilder.php on line 95
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\AdsHeaderFormatter::__construct(): Implicitly marking parameter $adsUtilityRegistry as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsHeaderFormatter.php on line 36
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\AdsHeaderFormatter::__construct(): Implicitly marking parameter $libraryMetadataProvider as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsHeaderFormatter.php on line 36
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\AdManagerServices::__construct(): Implicitly marking parameter $adsSoapClientFactory as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/AdManagerServices.php on line 37
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\AdManagerServices::__construct(): Implicitly marking parameter $adManagerHeaderHandler as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/AdManagerServices.php on line 37
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\AdsSoapClientFactory::__construct(): Implicitly marking parameter $reflection as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClientFactory.php on line 47
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\AdsSoapClientFactory::populateOptions(): Implicitly marking parameter $soapSettings as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClientFactory.php on line 111
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\SoapLogMessageFormatter::__construct(): Implicitly marking parameter $requestHttpHeadersToScrub as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/SoapLogMessageFormatter.php on line 57
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\SoapLogMessageFormatter::__construct(): Implicitly marking parameter $requestSoapHeadersToScrub as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/SoapLogMessageFormatter.php on line 57
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\SoapLogMessageFormatter::__construct(): Implicitly marking parameter $requestSoapBodyTagsToScrub as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/SoapLogMessageFormatter.php on line 57
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\SoapLogMessageFormatter::__construct(): Implicitly marking parameter $additionalRequestSummaryHeaders as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/SoapLogMessageFormatter.php on line 57
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\SoapLogMessageFormatter::__construct(): Implicitly marking parameter $additionalResponseSummaryHeaders as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/SoapLogMessageFormatter.php on line 57
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\Util\OAuth2TokenRefresher::getOrFetchAccessToken(): Implicitly marking parameter $httpHandler as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/OAuth2TokenRefresher.php on line 61
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\AdsSoapClient::__construct(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php on line 67
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\AdsSoapClient::logSoapCall(): Implicitly marking parameter $soapFault as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php on line 244
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\Statement::__construct(): Implicitly marking parameter $values as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/Statement.php on line 26
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\Statement::setValues(): Implicitly marking parameter $values as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/Statement.php on line 62
[21-May-2025 16:00:01 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\AdsGuzzleProxyHttpHandler::__construct(): Implicitly marking parameter $httpClient as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsGuzzleProxyHttpHandler.php on line 43
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\SavedQueryPage::__construct(): Implicitly marking parameter $results as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/SavedQueryPage.php on line 32
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\SavedQueryPage::setResults(): Implicitly marking parameter $results as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/SavedQueryPage.php on line 87
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\ReportQuery::__construct(): Implicitly marking parameter $dimensions as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/ReportQuery.php on line 92
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\ReportQuery::__construct(): Implicitly marking parameter $columns as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/ReportQuery.php on line 92
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\ReportQuery::__construct(): Implicitly marking parameter $dimensionAttributes as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/ReportQuery.php on line 92
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\ReportQuery::__construct(): Implicitly marking parameter $customFieldIds as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/ReportQuery.php on line 92
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\ReportQuery::__construct(): Implicitly marking parameter $cmsMetadataKeyIds as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/ReportQuery.php on line 92
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\ReportQuery::__construct(): Implicitly marking parameter $customDimensionKeyIds as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/ReportQuery.php on line 92
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\ReportQuery::setDimensions(): Implicitly marking parameter $dimensions as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/ReportQuery.php on line 121
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\ReportQuery::setColumns(): Implicitly marking parameter $columns as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/ReportQuery.php on line 157
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\ReportQuery::setDimensionAttributes(): Implicitly marking parameter $dimensionAttributes as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/ReportQuery.php on line 175
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\ReportQuery::setCustomFieldIds(): Implicitly marking parameter $customFieldIds as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/ReportQuery.php on line 193
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\ReportQuery::setCmsMetadataKeyIds(): Implicitly marking parameter $cmsMetadataKeyIds as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/ReportQuery.php on line 211
[21-May-2025 16:00:02 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\v202502\ReportQuery::setCustomDimensionKeyIds(): Implicitly marking parameter $customDimensionKeyIds as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/v202502/ReportQuery.php on line 229
[21-May-2025 16:00:03 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\Util\v202502\ReportDownloader::__construct(): Implicitly marking parameter $httpClient as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/Util/v202502/ReportDownloader.php on line 67
[21-May-2025 16:00:03 Europe/Dublin] PHP Deprecated: Google\AdsApi\AdManager\Util\v202502\ReportDownloader::__construct(): Implicitly marking parameter $httpClientFactory as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdManager/Util/v202502/ReportDownloader.php on line 67
[21-May-2025 16:00:03 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\AdsGuzzleHttpClientFactory::__construct(): Implicitly marking parameter $httpClient as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsGuzzleHttpClientFactory.php on line 47
[21-May-2025 16:00:03 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\GuzzleLogMessageFormatter::__construct(): Implicitly marking parameter $summaryMessageFormatter as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/GuzzleLogMessageFormatter.php on line 65
[21-May-2025 16:00:03 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\GuzzleLogMessageFormatter::__construct(): Implicitly marking parameter $detailedMessageFormatter as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/GuzzleLogMessageFormatter.php on line 65
[21-May-2025 16:00:03 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\GuzzleLogMessageFormatter::formatSummary(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/GuzzleLogMessageFormatter.php on line 104
[21-May-2025 16:00:03 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\GuzzleLogMessageFormatter::formatDetailed(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/GuzzleLogMessageFormatter.php on line 129
[21-May-2025 16:00:03 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\GuzzleLogMessageFormatter::formatDetailed(): Implicitly marking parameter $error as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/GuzzleLogMessageFormatter.php on line 129
[21-May-2025 16:00:03 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\GuzzleLogMessageFormatter::scrubAndFormatDetailedMessage(): Implicitly marking parameter $response as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/GuzzleLogMessageFormatter.php on line 176
[21-May-2025 16:00:03 Europe/Dublin] PHP Deprecated: Google\AdsApi\Common\GuzzleLogMessageFormatter::scrubAndFormatDetailedMessage(): Implicitly marking parameter $error as nullable is deprecated, the explicit nullable type must be used instead in /...../vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/GuzzleLogMessageFormatter.php on line 176
Even after updating to v69.0.0, they're still there - for example: AdManagerSessionBuilder.php, line 95.
public function fromFile(string $path = null)
Looks like #804 will fix this. Can that PR be merged, please?
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PHP 8.4 deprecation log and the listed files under src/Google/AdsApi/Common and src/Google/AdsApi/AdManager, including ConfigurationLoader.php, ReportQuery.php, and the v202502 classes. Review each reported nullable parameter and run the project’s PHP test suite on PHP 8.4; done means the reported deprecation warnings no longer occur.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100