Allow xsd:enumeration
I wanted to get values from xsd:enumeration elements in my project and I saw that @demonkoryu had done work to add that feature. This repo has been updated a bit since @demonkoryu forked and added that feature so I took the liberty of merging the changes in, and added a feature to allow numeric constants, and an empty string constant.
Thoughts?
For the record, here's the issue where I found out about the fork: #35
And here's the fork: https://github.com/rtsde/xsd2php
Tests are failing
I wonder how the test may fail, in the end, this is simply the second PHP 5.5 build with prefer lowest and it can't call a method which should be available in Zend ClassGenerator.
The test SHOULD pass unless composer pulled a broken version of Zend framework
add constant was added in 2.4. the minimum is 2.3 at the moment
I see, the prefer-lowest is the culprit
@goetas So what is the way to go now?
Wrap the addConstant with if (method_exists()) or bump the min req?
In previous version of the library i had this feature, but i have removed it (and added) many times. So at the moment I'm not propense to accept this PR.
Talking for my self, I found out that having constants does not provide a real advantage, and there are so many edge cases that can not be handled. Plus there is not a real way to enforce PHP to use constants, instead of hardcoded strings.. (maybe value objects?) At the end, in some of the latest iterations i have decided simply to not implement it. (unless someone proposes a really good solution obviously).
Keeping this open anyway. Maybe a great solution will pop up one day :)
Ah, as it stands in the readme, I'm moving the development to https://github.com/goetas-webservices/xsd2php