You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** $onFailure is a 3rd parameter introduced in Laravel 12.9.0 to {@see \Illuminate\Database\ConnectionInterface} */
95
+
if ($optionsinstanceof Closure) {
96
+
$onFailure = $options;
97
+
$options = [];
98
+
} elseif (isset($options['onFailure'])) {
99
+
assert($options['onFailure'] instanceof Closure, newTypeError(sprintf('Expected "onFailure" option to be a Closure or null, got %s', get_debug_type($options['onFailure']))));
100
+
$onFailure = $options['onFailure'];
101
+
unset($options['onFailure']);
102
+
}
103
+
87
104
$attemptsLeft = $attempts;
88
105
$callbackResult = null;
89
-
$throwable = null;
90
106
91
107
$callbackFunction = function (Session$session) use ($callback, &$attemptsLeft, &$callbackResult, &$throwable) {
92
108
$attemptsLeft--;
@@ -110,6 +126,10 @@ public function transaction(Closure $callback, $attempts = 1, array $options = [
0 commit comments