Skip to content

Conversation

@veewee
Copy link
Member

@veewee veewee commented Nov 24, 2025

Q A
Type bug
BC Break no
Fixed issues

Summary

@veewee veewee added the bug Something isn't working label Nov 24, 2025
@veewee veewee requested a review from Copilot November 24, 2025 11:06
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 fixes bugs related to setting metadata properties back to null by replacing optional() with nullable() type coercion. The issue was that optional() would not properly handle explicit null values, preventing metadata from being cleared once set.

Key Changes:

  • Updated type coercion from optional() to nullable() for metadata setter methods
  • Added test coverage verifying that metadata properties can be set back to null
  • Added import for nullable type function

Reviewed changes

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

File Description
src/Metadata/Model/TypeMeta.php Changed type coercion from optional() to nullable() in withEnums, withExtends, withRestriction, withUnions, and withArrayType methods, and added nullable import
tests/Unit/Metadata/Collection/TypeMetaTest.php Added test assertions to verify metadata properties can be emptied by passing null and return a new instance

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

@veewee veewee merged commit dd097d8 into php-soap:main Nov 24, 2025
9 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