Describe the bug
When generating classes from a WSDL that contains element names with invalid PHP identifiers (e.g. SomethingAuthorization.SomethingAuthorization), the generated PHP classes do not declare corresponding properties.
At runtime, when SoapClient->__soapCall() hydrates the response, PHP creates a dynamic property with the raw name.
On PHP 8.2, this triggers deprecation warnings like:
WARNING: Creation of dynamic property Example\ArrayType\ArrayOfSomething_SomethingAuthorization:$SomethingAuthorization.SomethingAuthorization is deprecated in ...\Example.php on line...
To Reproduce
- Generate classes from a WSDL that has element names containing a dot (
.).
- Call the relevant SOAP operation that returns this element.
- Observe that the object ends up with a dynamic property and PHP emits a deprecation warning.
Expected behavior
- The generator should normalize invalid PHP identifiers into valid property names (e.g. replace
. with _).
- The generated class should declare the property explicitly so hydration does not fall back to dynamic properties.
Ideas for fix
- During generation, normalize all invalid identifiers in property names (e.g.
. → _).
- Ensure the corresponding declared property is created in the generated class.