From d9b803a1a4898e7d5b3145e51c77499815ce3401 Mon Sep 17 00:00:00 2001 From: Mohamed Said Date: Wed, 9 Dec 2020 20:07:50 +0200 Subject: [PATCH] rename dispatchAfterCommit to afterCommit --- src/Illuminate/Broadcasting/BroadcastEvent.php | 2 +- src/Illuminate/Bus/Queueable.php | 6 +++--- src/Illuminate/Events/Dispatcher.php | 4 ++-- src/Illuminate/Mail/SendQueuedMailable.php | 2 +- src/Illuminate/Notifications/SendQueuedNotifications.php | 2 +- src/Illuminate/Queue/Queue.php | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Illuminate/Broadcasting/BroadcastEvent.php b/src/Illuminate/Broadcasting/BroadcastEvent.php index 4ef4b73a4ce2..e9c0897a553b 100644 --- a/src/Illuminate/Broadcasting/BroadcastEvent.php +++ b/src/Illuminate/Broadcasting/BroadcastEvent.php @@ -46,7 +46,7 @@ public function __construct($event) $this->event = $event; $this->tries = property_exists($event, 'tries') ? $event->tries : null; $this->timeout = property_exists($event, 'timeout') ? $event->timeout : null; - $this->dispatchAfterCommit = property_exists($event, 'dispatchAfterCommit') ? $event->dispatchAfterCommit : null; + $this->afterCommit = property_exists($event, 'afterCommit') ? $event->afterCommit : null; } /** diff --git a/src/Illuminate/Bus/Queueable.php b/src/Illuminate/Bus/Queueable.php index b371e3bb21cc..e8043bde0c00 100644 --- a/src/Illuminate/Bus/Queueable.php +++ b/src/Illuminate/Bus/Queueable.php @@ -57,7 +57,7 @@ trait Queueable * * @var bool|null */ - public $dispatchAfterCommit; + public $afterCommit; /** * The middleware the job should be dispatched through. @@ -147,7 +147,7 @@ public function delay($delay) */ public function afterCommit() { - $this->dispatchAfterCommit = true; + $this->afterCommit = true; return $this; } @@ -159,7 +159,7 @@ public function afterCommit() */ public function beforeCommit() { - $this->dispatchAfterCommit = false; + $this->afterCommit = false; return $this; } diff --git a/src/Illuminate/Events/Dispatcher.php b/src/Illuminate/Events/Dispatcher.php index 9e44677df977..dac103348a7d 100755 --- a/src/Illuminate/Events/Dispatcher.php +++ b/src/Illuminate/Events/Dispatcher.php @@ -595,8 +595,8 @@ protected function propagateListenerOptions($listener, $job) $job->timeout = $listener->timeout ?? null; - $job->dispatchAfterCommit = property_exists($listener, 'dispatchAfterCommit') - ? $listener->dispatchAfterCommit : null; + $job->afterCommit = property_exists($listener, 'afterCommit') + ? $listener->afterCommit : null; $job->retryUntil = method_exists($listener, 'retryUntil') ? $listener->retryUntil() : null; diff --git a/src/Illuminate/Mail/SendQueuedMailable.php b/src/Illuminate/Mail/SendQueuedMailable.php index 9e656c10a925..a4567dadcb4e 100644 --- a/src/Illuminate/Mail/SendQueuedMailable.php +++ b/src/Illuminate/Mail/SendQueuedMailable.php @@ -42,7 +42,7 @@ public function __construct(MailableContract $mailable) $this->mailable = $mailable; $this->tries = property_exists($mailable, 'tries') ? $mailable->tries : null; $this->timeout = property_exists($mailable, 'timeout') ? $mailable->timeout : null; - $this->dispatchAfterCommit = property_exists($mailable, 'dispatchAfterCommit') ? $mailable->dispatchAfterCommit : null; + $this->afterCommit = property_exists($mailable, 'afterCommit') ? $mailable->afterCommit : null; } /** diff --git a/src/Illuminate/Notifications/SendQueuedNotifications.php b/src/Illuminate/Notifications/SendQueuedNotifications.php index 4d78873619f5..2f983023f051 100644 --- a/src/Illuminate/Notifications/SendQueuedNotifications.php +++ b/src/Illuminate/Notifications/SendQueuedNotifications.php @@ -64,7 +64,7 @@ public function __construct($notifiables, $notification, array $channels = null) $this->notifiables = $this->wrapNotifiables($notifiables); $this->tries = property_exists($notification, 'tries') ? $notification->tries : null; $this->timeout = property_exists($notification, 'timeout') ? $notification->timeout : null; - $this->dispatchAfterCommit = property_exists($notification, 'dispatchAfterCommit') ? $notification->dispatchAfterCommit : null; + $this->afterCommit = property_exists($notification, 'afterCommit') ? $notification->afterCommit : null; } /** diff --git a/src/Illuminate/Queue/Queue.php b/src/Illuminate/Queue/Queue.php index 59935884e124..d14861de5d2e 100755 --- a/src/Illuminate/Queue/Queue.php +++ b/src/Illuminate/Queue/Queue.php @@ -32,7 +32,7 @@ abstract class Queue * * @return $this */ - protected $dispatchAfterCommit; + protected $afterCommit; /** * The create payload callbacks. @@ -295,8 +295,8 @@ function () use ($payload, $queue, $delay, $callback) { */ protected function shouldDispatchAfterCommit($job) { - if (is_object($job) && isset($job->dispatchAfterCommit)) { - return $job->dispatchAfterCommit; + if (is_object($job) && isset($job->afterCommit)) { + return $job->afterCommit; } if (isset($this->dispatchAfterCommit)) {