Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

abdurrahmanFaid's avatar

Laravel Vapor with Swoole PHP

How to use Swoole PHP with Laravel Vapor ?

0 likes
11 replies
bugsysha's avatar

It did not work few months ago when I've tried it. Probably nothing changed. But I've tried it just for fun. Why do you need it?

abdurrahmanFaid's avatar

@bugsysha There is a lot of Real-time tasks which I need to do using Swoole, But really I don't have a clear idea about this.

bugsysha's avatar

Problem with it is that it is not compatible with all extensions my company uses so that excluded it at the end. The only reason I've tried it was cause of performance gains.

If you are not suffering with very bad performance that only something like Swoole can solve, then I would advise to stay away from it. Especially in the case where you say that you do not have a clear idea about the use case.

abdurrahmanFaid's avatar

@bugsysha I don't have issues about performance, The main issue is that I need to implement real-time tasks, messaging, .. . Also I need to Be away from Pusher and similar services.

bugsysha's avatar

I can not recall the name of the repo, but I know there is a Laravel package that you can install that does "same" job as Pusher. Maybe that is better option?

bugsysha's avatar

But now when I posted that I've realized that probably would not work since for every request new instance is created. Hm...

abdurrahmanFaid's avatar

@bugsysha And we will return back to the question if I used something like ReactPHP, Ratchet, ..

So, Do you have any Ideas :D ?

bugsysha's avatar

At this point I would ask why you want to avoid Pusher and similar services?

abdurrahmanFaid's avatar

@bugsysha There is a lot of Real time tasks. According to this, Pusher is not the best solution in my Opinion.

How about laravel-websockets package ?

bugsysha's avatar

You should experience same problem I've already mentioned. What you can do is get a VPS and run it only as a Pusher alternative that you own and maintain.

Please or to participate in this conversation.