-
-
Notifications
You must be signed in to change notification settings - Fork 73
chore: remove all references to callable, replace by closure #323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: azjezz <azjezz@protonmail.com>
Pull Request Test Coverage Report for Build 1608969450
💛 - Coveralls |
Any specific reason for accepting a less broad set of callbacks? |
@azjezz any reason for this change? making upgrading quite a chore :) |
i guess it's because of first-class callables in 8.1 map($api->getAll($params), [PostingPeriod::class, 'fromArray']); becomes map($api->getAll($params), PostingPeriod::fromArray(...)); |
although we did have some callable classes (with before: map($value, $this->foo); after: map($value, Closure::fromCallable($this->foo)); or map($value, $this->foo->__invoke(...)); because this doesn't work: map($value, $this->foo(...)); not very nice |
i'm an idiot. map($value, ($this->foo)(...)); |
The reasoning behind this change is in revolt-php, which uses Closure for all callbacks within the event loop, we can use Closure in async related functions, but that would be an inconsistency that i would rather avoid. |
Signed-off-by: azjezz azjezz@protonmail.com