Skip to content

Conversation

@veewee
Copy link
Member

@veewee veewee commented Dec 4, 2025

Q A
Type bug
BC Break no
Fixed issues

Summary

Works together with the change in:
php-soap/wsdl-reader#52

anonymous complex-types won't get any xsi:type attribute since they can be mapped directly from either the declaration (literal) or since the children's types are known (for encoded).

@veewee veewee requested a review from Copilot December 4, 2025 10:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR prevents the generation of xsi:type attributes for anonymous complex types in SOAP XML encoding. Anonymous complex types don't have accessible names, so including xsi:type attributes for them is unnecessary since they can be mapped directly from their declaration or through their children's types.

  • Added logic to skip xsi:type generation when a type is marked as local/anonymous
  • Updated test expectations to reflect the removal of xsi:type attribute for anonymous complex types

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Xml/Writer/XsiAttributeBuilder.php Added check to skip xsi:type generation for local/anonymous complex types
tests/PhpCompatibility/Schema036Test.php Updated test expectation to remove xsi:type attribute from anonymous testType2 element

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@veewee veewee force-pushed the skip-xsi-type-for-anonymous-complex-types branch from ae2fee6 to d06203b Compare December 5, 2025 06:48
@veewee veewee force-pushed the skip-xsi-type-for-anonymous-complex-types branch from d06203b to 176548d Compare December 5, 2025 06:51
@veewee veewee added the bug Something isn't working label Dec 5, 2025
@veewee veewee merged commit f0cd4b6 into php-soap:main Dec 5, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant