zendtech / IbmiToolkit

PHP frontend to XMLSERVICE for IBM i development.
BSD 3-Clause "New" or "Revised" License
46 stars 34 forks source link

Workaround optional args for API that presents mandatory arg first #150

Closed NattyNarwhal closed 3 years ago

NattyNarwhal commented 3 years ago

This API should really put $pgm first if it's semantically required, but it puts some optional arguments before it. As such, make them all optional with a warning in place that $pgm is really not actually.

See https://github.com/zendtech/IbmiToolkit/commit/3e5377ea605abb3782ce257fb6f2f41b38a929ac#commitcomment-47897314

alanseiden commented 3 years ago

I suggest we allow $value to be optional ($value = '') rather than making $varName mandatory, because it always would have made sense to allow $value to be omitted when XMLSERVICE's default parameter values are acceptable (blank or zero as the case may be) or when it's an output parameter.

NattyNarwhal commented 3 years ago

Closing due to #151