Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes #177

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

metalinspired
Copy link

Here is a list of changes I have made (hopefully I did not forget something):

  • Dropped support for PHP 7.
  • Fixed converting Any element. Since I actually do not need this element I only went so far to make the convertion work when this element is used. It seems to work fine, even wrote a test, but I'll let you be the judge of that.
  • Fixed few "visit" methods that were missing Choice and Group as child elements.
  • Fixed converting Choice that is inside of a GroupRef that has maxOccurs set to unbounded converted as property of that type instead being an array.
  • Fixed properties/methods duplicated in extending class.
  • Properties are now protected by default.
  • Return type hint is now "static" as some IDEs complain how methods do not exist in extending classes when it is set to "self".
  • Added support for "fixed" and "default" values. For "fixed" values, the setter still exists in PHP code but is not present in JMS definition. This was the simplest solution since I did not wanted to mess with PHP inheritance rules.
  • Added "strict_types" option to configuration.
  • Added types to properties/arguments/return values in some places.

Note that all my work is based on converting XZuFi 2.3.
So far everything seems to work as expected and soon I will be using generated classes and (de)serialization in customer code, which will in it self be a test if I broke something 😄

Oh and another thing, if you run the tests (all of them) it might happen that OTA tests fail but it seems that it is a bug in JMS as one interface defines "parse(): array" but class implementing it returns a string.

@goetas
Copy link
Member

goetas commented Nov 22, 2024

oh, this looks actually super great!!
On the other hand looks very hard to review... are your changes "per" commit?
Is there any chance you could split it into multiple pull requests?

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.

2 participants