Closed tbreuss closed 1 year ago
Types are currently configured within this file: xsd_types.yml. Temporarily, you can use your own file passing the xsd-types-path
option. If you succeed to generate a fully functional package, hopefully, without further type issue, please share it with me so I can fix the default types.
I'll do it the way you suggested. Thanks.
Please see pull request #293, which should fix this issue.
Pull request #293 fixes gYearMonth and gMonthDay.
Describe the bug
It seems, that for an "xs:gYearMonth" the generated PHP code has a wrong type hint. This eventually leads to an type hint exception "Cannot assign string to property of type ?int".
To Reproduce
The given XSD looks like this:
The corresponding generated PHP code looks like this:
The given XML data looks like this:
Which leads to a PHP exception "Cannot assign string to property of type ?int".
Expected behavior
My understanding is that the generated PHP type for a "xs:gYearMonth" must be a string.