zendtech / IbmiToolkit

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

Make supposedly optional arguments before required args required #142

Closed NattyNarwhal closed 3 years ago

NattyNarwhal commented 3 years ago

This isn't allowed by PHP anymore, and these seemingly were never called omitting the optionals to the left of required. Changing the order of the args would be breaking compat and setting a default value would be semantically inappropriate on some.

The similator funcs/ctors that did have their required/optional arguments in order weren't changed. This should go under some review to make sure it doesn't break user code in avoidable ways, but this is required going forward for PHP 8.

alanseiden commented 3 years ago

https://www.php.net/manual/en/functions.arguments.php "As of PHP 8.0.0, passing mandatory arguments after optional arguments is deprecated. This can generally be resolved by dropping the default value." There were some "optional" parameters that were pretty much required for the toolkit to work.