[php-src] Issue #15252: SOAP XML broken from since PHP 8.3.9 when using classmap constructor option
| From: | brainfoolong | Date: | Tue, 06 Aug 2024 08:38:11 +0000 |
| Subject: | [php-src] Issue #15252: SOAP XML broken from since PHP 8.3.9 when using classmap constructor option | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247443@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15252
Author: brainfoolong
### Description
A bit of a weird issue, hope you can follow.
I am on a windows machine, downloading following php packages:
https://windows.php.net/downloads/releases/archives/php-8.3.8-Win32-vs16-x64.zip
https://windows.php.net/downloads/releases/archives/php-8.3.9-Win32-vs16-x64.zip
When running the "test.php" from attached ZIP, i get different outputs, using no php.ini
and just with soap extension enabled:
Test-Script: [test.zip](https://github.com/user-attachments/files/16507706/test.zip) (You need the
files from zip, it contains the WSDL and XSD files required.
### PHP 8.3.8
```
D:\php-8.3.8-Win32-vs16-x64\php.exe -dextension=D:\php-8.3.8-Win32-vs16-x64\ext\php_soap.dll
D:\test\test.php
PHPVERSION: 8.3.8
XML: <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages"><SOAP-ENV:Body><ns2:DeleteItem><ns2:ItemIds><ns1:ItemId
Id="AAMkAGJjMzNlMDA4LTU5NzMtNDZmMS1hN2QwLWE5NDJhOTg4ZTE3ZABGAAAAAADor6LtxqzcTZY8k3FzncNoBwBqStc3k+YrRrwI06yPhA+DAAAAAAEPAABqStc3k+YrRrwI06yPhA+DAASvw7+bAAA="
ChangeKey="CQAAABYAAABqStc3k+YrRrwI06yPhA+DAASv1Zxc"/></ns2:ItemIds></ns2:DeleteItem></SOAP-ENV:Body></SOAP-ENV:Envelope>
```
### PHP 8.3.9 or even PHP 8.3.10
```
D:\php-8.3.9-Win32-vs16-x64\php.exe -dextension=D:\php-8.3.9-Win32-vs16-x64\ext\php_soap.dll
D:\test\test.php
PHPVERSION: 8.3.9
XML: <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages"><SOAP-ENV:Body><ns2:DeleteItem><ns2:ItemIds
xsi:type="ns1:ItemIdType"/></ns2:DeleteItem></SOAP-ENV:Body></SOAP-ENV:Envelope>
```
You will notice that the output is different, PHP 8.3.9+ missing a significant part of the message
and instead inserts a "xmlns:xsi" namespace for whatever reason.
The error comes from the SOAP extension. When you just link PHP 8.3.9 to the .dll file from PHP
8.3.8 it just works also as expected.
This behaviour resulting in SOAP is broken in this specific case starting from PHP 8.3.9 - We saw it
on our automated tests after upgrade to PHP 8.3.9 from PHP 8.3.8
### PHP Version
PHP 8.3.9 or higher
### Operating System
Windows