TASK: Address PHP deprecation#30
TASK: Address PHP deprecation#30lorenzulrich wants to merge 1 commit intoopen-lms-open-source:masterfrom
Conversation
|
I'm not sure how changing the param order can be considered backwards compatible? Indeed, in this patch you have to change calling code. I would recommend against changing param order. Instead I think it makes more sense to make And you can play with older versions of PHP back to at least 4.3 to see that this has always been the case. If you try to call By making those params required, existing behaviour is preserved, and no calling code needs to be modified. |
As of PHP 8.0, a deprecation log item is thrown when a required parameter follows an optional parameter:
By changing the order appropriately, this can be fixed. It is backwards-compatible to any currently supported PHP version (and even much older ones).