Mark by @param-closure-this filterable() and other function/methods that binds the closure to a different object #6865
Unanswered
alies-dev
asked this question in
Ideas & Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
@param-closure-this annotation is created for this.
Why it's important: to avoid tools and devs using static anonymous functions as an argument for
filterable()
Tools that may convert non-static lambda into static:
Why they do it: static is faster, so it's great as the default option:
see https://github.com/Ocramius/GeneratedHydrator/releases/tag/3.0.0 (yes, it's 2019, ideally it's better to check on PHP 8, but it's out of the scope of this discussion)
Beta Was this translation helpful? Give feedback.
All reactions