DB::transaction() unnecessary \Closure type-hint for first argument #33819
Unanswered
pervozdanniy
asked this question in
General
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.
-
Why does
Illuminate\Database\Concerns\ManagesTransactions::transaction()
method accepts only\Closure
as first argument, notcallable
pseudo type?The usage of closure is limited to simple:
$callbackResult = $callback($this);
Is there any real reason to restrict users from using invokable objects or something like that?
Beta Was this translation helpful? Give feedback.
All reactions