-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
class SetQueue not found origination from the Mail facade #26136
Comments
Hi there, Looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs or problems. If you have a question on how to use functionality provided by this repo you can try one of the following channels: |
@Cranavvo I'm having this same issue after updating to PHP 7.3. I have no changes in the codebase. I've tried changing the Did you find a solution? |
@patrickomeara same here after upgrading to PHP 7.3 |
Okay I'll have a look at this. I'll need more info and/or code to debug this further. Please post relevant code like models, jobs, commands, notifications, events, listeners, controller methods, routes, etc. You may use https://paste.laravel.io to post larger snippets or just reply with shorter code snippets. Thanks! |
To give it a little more context. It concerns an app that was updated from Laravel 5.5 to 5.7. PHP has been updated from 7.1 to 7.3. I changed It's odd that sometimes it works (same model, same mail) without any problems. I thought it might have something to do with OPcache. So now I also clear the OPcache with a command ( Here is an error message: https://paste.laravel.io/0603b738-da94-452f-bc73-a54cdde4398f |
Which queue connection are you using? Did you modify the queue config from the base laravel skeleton? Can you post the code of the |
I am using redis (horizon). I updated the NewsflowController <?php
namespace App\Http\Controllers;
use App\Models\NewsflowArticle;
use App\Models\NewsflowSubscription;
use Illuminate\Support\Facades\Mail;
use App\Mail\Newsflow\NewsflowNotification;
class NewsflowController extends Controller
{
///
///
protected function sendPushNotifications(NewsflowArticle $article)
{
$subscriptions = NewsflowSubscription::where('confirmed', true)->where('interval', 'push')->get();
foreach ($subscriptions as $subscription) {
Mail::to($subscription->email)->send(new NewsflowNotification($subscription, 'push', $article));
}
}
App\Mail\Newsflow\NewsflowNotification.php <?php
namespace App\Mail\Newsflow;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class NewsflowNotification extends Mailable implements ShouldQueue
{
use Queueable, SerializesModels;
public $subscription;
public $article;
public $interval;
public function __construct($subscription, $interval, $article)
{
$this->subscription = $subscription;
$this->interval = $interval;
$this->article = $article;
}
public function build()
{
return $this->view('emails.newsflow.notification');
}
} |
Did you restart horizon and purged any orphan processes with |
I'm not using queues of any sort in my application... my shitty solution was opening up the MailServiceProvider in Laravel (vendor/laravel) and commenting out this:
I'm still cursed to this day, an error will trigger every time to Mail facade is used (if the code above isn't commented out). |
Yes, with the following after each deploy:
|
I'm actually pretty sure it has nothing to do with the framework itself. It's just very strange that it happened so suddenly after upgrading to PHP 7.3. Had no problem the whole day with this error and the mails were sent without problems. Just now the error occurred again. After I restarted nginx, everything works again. |
I'm going to close this off then if this problem was resolved. Could have been a hiccup with the upgrade to 7.3? Let me know if the problem persists. |
For MacBook Users just use command "valet restart" In my case, it's working now. Try to restart your server that might be helpful. |
Hi all,
Can anyone shed some light on why the Mail facade is spewing out that a certain
SetQueue
class cannot be found? I haven't changed anything code wise, it weirdly started happening overnight.I've tried to clear my composer cache and reinstall all the repositories and dumped the auto-load etc but I can't seem to get it working 👎 .
Anyone else having the same problem or experienced this?
The traceback can be found here.
The text was updated successfully, but these errors were encountered: