Skip to content

Conversation

@radeno
Copy link
Contributor

@radeno radeno commented Feb 7, 2024

Currently, boolean values are converted incorrectly. Only true value is converted to 1 which is allowed value. false is converted as an empty attribute, which is incorrect.

Based on https://www.w3.org/TR/xmlschema-2/#boolean

true, false, 1, 0 are allowed values.

We don't want to break previous behavior so that feature can be enabled by option.

@radeno
Copy link
Contributor Author

radeno commented Feb 7, 2024

@SanderMuller you pointed to my previous PR about converting to xsi:nil. What do you think about this change, should we consider it as breaking change or bug fixing?

@SanderMuller
Copy link

@SanderMuller you pointed to my previous PR about converting to xsi:nil. What do you think about this change, should we consider it as breaking change or bug fixing?

Looks good, since it's opt-in it shouldn't be a breaking change

@freekmurze freekmurze merged commit c95fd4d into spatie:main Feb 7, 2024
@freekmurze
Copy link
Member

Thanks!

@radeno radeno deleted the add-boolean-types-processing branch February 7, 2024 11:46
@radeno
Copy link
Contributor Author

radeno commented Feb 7, 2024

Welcome, it was needed for my requirements anyway :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants