Skip to content

Commit

Permalink
rename dispatchAfterCommit to afterCommit
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid committed Dec 9, 2020
1 parent ecaf5e5 commit d9b803a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Broadcasting/BroadcastEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Bus/Queueable.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ trait Queueable
*
* @var bool|null
*/
public $dispatchAfterCommit;
public $afterCommit;

/**
* The middleware the job should be dispatched through.
Expand Down Expand Up @@ -147,7 +147,7 @@ public function delay($delay)
*/
public function afterCommit()
{
$this->dispatchAfterCommit = true;
$this->afterCommit = true;

return $this;
}
Expand All @@ -159,7 +159,7 @@ public function afterCommit()
*/
public function beforeCommit()
{
$this->dispatchAfterCommit = false;
$this->afterCommit = false;

return $this;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Events/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Mail/SendQueuedMailable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Notifications/SendQueuedNotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Queue/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ abstract class Queue
*
* @return $this
*/
protected $dispatchAfterCommit;
protected $afterCommit;

/**
* The create payload callbacks.
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit d9b803a

Please sign in to comment.