Open sbrattla opened 5 years ago
I'm not too concerned about backwards compatibility for the generated client code. I'd say just submit the patch and let people deal with the compatibility issues.
Alright!
But, if I wanted to make it configurable, is there a way to inject config variables into a freemarker template (which generates the client)?
Do you work with any particular coding standards in the fmt files by the way (indents etc)? I might try to make the fmt files slightly more readable as well.
Cheers!
On 11. januar 2019 17:24:47 Ryan Heaton notifications@github.com wrote:
I'm not too concerned about backwards compatibility for the generated client code. I'd say just submit the patch and let people deal with the compatibility issues. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Yes, variables are passed into the freemarker template via the "model" (it's just a map).
See PHPXMLClientModule
lines 161-172.
The PHP XML client currently parses all data as
string
. I'd really like it to at least parse boolean values asboolean
, but I'm uncertain about the consequences.If anyone out there use the PHP XML client, they'd might now be doing
isAvailable() === 'true'
, and if I commit a patch for the parser this would turn into a false sinceisAvailable()
would not equal aboolean
true with===
.On the other hand, it's much easier to work with booleans as
boolean
. That would allow me to doisAvailable()
without the explicit=== 'true'
.Maybe both variations could be supported by allowing a configurable variable for the PHP XML client module, something like
useRealTypes
?Note! I'd be more than happy to contribe with a patch. I'd just like to hear if this could have unforeseen consequences.
What's your thoughts on this @stoicflame?