googleads / googleads/googleads-php-lib
Incompatible declaration error in PHP 8.5
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 676
- Forks
- 754
- PR merge metrics
- No merged PRs in 30d
Description
Since the release of PHP 8.5, the SoapClient::__doRequest() function has been updated with a new parameter (uriParserClass). So the declaration in AdsSoapClient.php is now incorrect, and you get this error:
Fatal error: Declaration of Google\AdsApi\Common\AdsSoapClient::__doRequest($request, $location, $action, $version, $one_way = 0) must be compatible with SoapClient::__doRequest(string $request, string $location, string $action, int $version, bool $oneWay = false, ?string $uriParserClass = null): ?string ...
For now, you must remain on 8.4.
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 in AdsSoapClient.php at the __doRequest() declaration and compare it with the PHP 8.5 SoapClient signature shown in the report. Verify the compatibility fix on PHP 8.5; done means the client no longer raises the fatal declaration error while remaining compatible with PHP 8.4.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100