Skip to content

SoapClient::__doRequest undocumented backwards incompatible in PHP 8.5 #20274

@brainfoolong

Description

@brainfoolong

Description

I found an undocumented backwards incompatible change that is breaking existing SoapClient implementations?!

Here, this break is not listed
https://github.com/php/php-src/blob/php-8.5.0RC3/UPGRADING

Here, this change is documented but not as breaking

php-src/NEWS

Line 341 in ad19b3e

- SOAP:

The signature of SoapClient::__doRequest has changed, so it triggers the following errors in userland code

Declaration of xxxt::__doRequest($request, $location, $action, $version, $oneWay = 0): ?string must be compatible with SoapClient::__doRequest(string $request, string $location, string $action, int $version, bool $oneWay = false, ?string $uriParserClass = null): ?string

Which i guess is quite common because you almost always have to override this function in SoapClient.

Also with the now per default enabled opcache for all in PHP 8.5 and the default opcache settings, you may not notice this errors because opcache swallows this error per default after the file is cached. This really hunted me because i've tested previous 8.5 versions without this error, until recently i found out about the opcache bug hidding thing.

Do i miss something?

PHP Version

PHP 8.5RC3, since PHP 8.5beta1

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions