Skip to content

ext/soap: use {Type|Value}Errors for programming erros in SoapServer constructor#22573

Open
Girgias wants to merge 3 commits into
php:masterfrom
Girgias:2026-07-soaop-server-constructor-use-value-errors
Open

ext/soap: use {Type|Value}Errors for programming erros in SoapServer constructor#22573
Girgias wants to merge 3 commits into
php:masterfrom
Girgias:2026-07-soaop-server-constructor-use-value-errors

Conversation

@Girgias

@Girgias Girgias commented Jul 3, 2026

Copy link
Copy Markdown
Member

No description provided.

@ndossche

ndossche commented Jul 3, 2026

Copy link
Copy Markdown
Member

I don't think this is a good idea. The primary way to communicate with an application using SoapServer is via a soap client, and that client expects XML output for the error, it won't be able to parse a normal PHP exception output.

@Girgias

Girgias commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

I don't think this is a good idea. The primary way to communicate with an application using SoapServer is via a soap client, and that client expects XML output for the error, it won't be able to parse a normal PHP exception output.

I don't see how these are any different from the TypeErrors thrown by ZPP? And we already throw ValueErrors in other SoapServer methods.

If those were commands sent by a client then I would agree, but this is configuring the SOAP server by someone, and those errors should never even be seen by a client.

@Girgias Girgias force-pushed the 2026-07-soaop-server-constructor-use-value-errors branch from 8ad9e98 to be0e9f0 Compare July 3, 2026 17:30
Comment thread ext/soap/tests/SoapServer/invalid-soap_version-option-type.phpt Outdated
Comment thread ext/soap/soap.c Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants