Skip to content

SoapClient 3.3.0: Any hints how to generate class with default value initialization? #529

Answered by veewee
trailsnail asked this question in Q&A
Discussion options

You must be logged in to vote

Those rules are being covered by the code generator though:

See https://github.com/phpro/soap-client/blob/v4.x/src/Phpro/SoapClient/CodeGenerator/TypeEnhancer/MetaTypeEnhancer.php

Our assemblers are not the once setting default values.
That is what laminas-code is doing for you. If you want to overwrite the default value - you should be configuring this through a custom property assembler:

https://github.com/laminas/laminas-code/blob/562e02b7d85cb9142b5116cc76c4c7c162a11a1c/src/Generator/PropertyGenerator.php#L42-L44

If done right, it could be added to this package maybe.

However, the problem you are really facing, is the fact that ext-soap is skipping setting the property during hydratio…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@trailsnail
Comment options

@veewee
Comment options

@trailsnail
Comment options

@veewee
Comment options

Answer selected by trailsnail
@trailsnail
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants