Code Monkey home page Code Monkey logo

Comments (3)

goetas avatar goetas commented on June 16, 2024

can you please provide a reporoducer for this issue?

from xsd2php.

fikusz01 avatar fikusz01 commented on June 16, 2024

I attached a zip with some example code: xsd-and-yaml-types-are-different.zip

There is the CompositIdentifierPlannedTypeType.php in the Models folder. You can see that it's typed with basic types such as string, int (and a \DateTime as well, but that one is working well). And there is the CompositIdentifierPlannedTypeType.yml yaml in the JMSMetadata folder. It uses different types such as Company, Core, ObjectType, TimetableYear, Variant. These are only wrappers for a $__value data member. If the PHP class would use these in type hints and phpdoc that would be nice, 'cause when you generate an xml, you have to use these wrappers in the setters (JMS insists on calling ->value() and it fails big time on string and int, and another thing is if you put null as $__value in the wrapper, then it's serialized with an empty tag, so you have to wrap each line in ˙if`, etc). By the way this should work both in PHP 5.6 and 7.4, so some intermediate solution would be good. I'd like to avoid modifying all the generated codes (~600 class and ~600 yaml).

from xsd2php.

goetas avatar goetas commented on June 16, 2024

this has been solved probably in #131.

if you use the long_no_conflicts naming strategy, it should work as expected

from xsd2php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.