Closed mvorisek closed 11 months ago
Thank you - are you happy for this to be pulled in under the MIT license?
yes, for all controbutions to this repo
Also, I'm not sure if you saw, but the phoDocumentor issue with spread operators has been fixed, so I'll get the docs updated for that soon. I'm fully focused on the work for DataTables 2 at the moment, but when that drops I'll circle back to the phpstan issues highlighted before.
Great, feel free to ping me on this PR once the CI is green, I will then make it green too. I don't need to hurry with these changes.
Thank you.
Note to self - before merge, I need to check the instanceof Closure
. I've got a feeling I tried that originally and it caused some backwards compatibility issues. I can't recall exactly what, but I'll take a closer look before merging in.
Note to self - before merge, I need to check the
instanceof Closure
. I've got a feeling I tried that originally and it caused some backwards compatibility issues. I can't recall exactly what, but I'll take a closer look before merging in.
def:
Closure
= native callable
callable
= Closure
type unioned with "callable like string" (ex: strlen
) and "callable like array" (ex: ['DateTime', 'createFromFormat']
)
This is documented in the 1st commit message to be equivalent, later, I replaced the checks in a few more places as the callbacks ends in Query::where
, where ïs_callable && is_object
was originally, ie. the behaviour is unchanged, or better said, the behaviour is fixed.
In general, accepting/checking for callable
is dangerous, as if regular string
or array
type is accepted as well, it is impossible to tell if the "callable like string/array" is really a callable
or string
/array
value.
@AllanJard can this PR be merged?
Yes, sorry - things very busy at the moment :). Thank you for this!
Thank you - are you happy for this to be pulled in under the MIT license?
Also, I'm not sure if you saw, but the phoDocumentor issue with spread operators has been fixed, so I'll get the docs updated for that soon. I'm fully focused on the work for DataTables 2 at the moment, but when that drops I'll circle back to the phpstan issues highlighted before.