Skip to content
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

[6.x] Deprecate sendNow and remove unneeded check #30999

Merged
merged 3 commits into from Jan 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 2 additions & 12 deletions src/Illuminate/Mail/PendingMail.php
Expand Up @@ -4,7 +4,6 @@

use Illuminate\Contracts\Mail\Mailable as MailableContract;
use Illuminate\Contracts\Mail\Mailer as MailerContract;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Contracts\Translation\HasLocalePreference;

class PendingMail
Expand Down Expand Up @@ -120,10 +119,6 @@ public function bcc($users)
*/
public function send(MailableContract $mailable)
{
if ($mailable instanceof ShouldQueue) {
return $this->queue($mailable);
}

return $this->mailer->send($this->fill($mailable));
}

Expand All @@ -132,6 +127,7 @@ public function send(MailableContract $mailable)
*
* @param \Illuminate\Contracts\Mail\Mailable $mailable
* @return mixed
* @deprecated Use send() instead.
*/
public function sendNow(MailableContract $mailable)
{
Expand All @@ -146,13 +142,7 @@ public function sendNow(MailableContract $mailable)
*/
public function queue(MailableContract $mailable)
{
$mailable = $this->fill($mailable);

if (isset($mailable->delay)) {
return $this->mailer->later($mailable->delay, $mailable);
}

return $this->mailer->queue($mailable);
return $this->mailer->queue($this->fill($mailable));
}

/**
Expand Down