Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Centrifugo Laravel Package

baks-dev/centrifugo

View on GitHub
Deep Wiki
Context7

composer require baks-dev/centrifugo

Frequently asked questions about Centrifugo
How does baks-dev/centrifugo compare to laravel-centrifugo for Laravel real-time features?
baks-dev/centrifugo abstracts Centrifugo’s API via Symfony’s event system, reducing boilerplate for Laravel’s event-driven workflows (e.g., `bus:subscribe`). It’s a more opinionated wrapper, while `laravel-centrifugo` offers a lighter, direct integration. Choose baks-dev if you prefer Laravel-native event bridges and admin tools.
Will this package work with Laravel 9.x or older versions?
No, baks-dev/centrifugo requires PHP 8.4+ and Symfony 6.4+ (via `baks-dev/core`), which conflicts with Laravel <10.x. If you’re on an older stack, consider `laravel-centrifugo` or upgrading Laravel first.
How do I deploy Centrifugo alongside Laravel using Docker?
Deploy Centrifugo separately (Docker recommended) with Redis/PostgreSQL for persistence. The package’s `Centrifugo.md` provides a Docker Compose example. Ensure your Laravel `.env` has `CENTRIFUGO_URL=ws://centrifugo:8000/connection/websocket` and `BROADCAST_DRIVER=redis`.
Can I use Sanctum or Passport for authentication with Centrifugo?
No, this package relies on Centrifugo’s token-based auth, which doesn’t natively integrate with Laravel’s guards. You’ll need custom middleware to bridge Sanctum/Passport tokens to Centrifugo’s API.
What happens if Centrifugo’s Redis connection drops during a Laravel event?
The package uses Laravel’s event bus to publish messages asynchronously. If Redis drops, messages may queue until reconnection. Test resilience with `php bin/phpunit --group=centrifugo` and monitor Centrifugo’s logs for connection errors.
Does this package support Centrifugo 6.x or newer features like Redis 7+?
No, it hardcodes Centrifugo 5.4, which lacks Redis 7+ support and newer features. Upgrading would require forking the package or waiting for a major version update.
How do I monitor Centrifugo metrics (e.g., channel subscriptions) from Laravel?
The package doesn’t expose Centrifugo metrics to Laravel natively. Use Prometheus with Centrifugo’s built-in support or query its HTTP API (`/api/info`) manually. For Laravel dashboards, integrate with tools like Horizon or build a custom admin panel.
What’s the upgrade path if I switch to Laravel 11 or Symfony 7+?
Check the package’s changelog for compatibility. If `baks-dev/core` drops Symfony 6.4 support, you’ll need to fork the package or wait for an update. Always test upgrades in staging first.
Do I need to manually install the Centrifugo JS client for frontend connections?
Yes, the package doesn’t bundle a client SDK. Include the official [Centrifugo JS client](https://github.com/centrifugal/centrifugo-js) in your frontend and connect to `CENTRIFUGO_URL` from your `.env`.
Is this package actively maintained? How do I report issues?
The package has recent updates (v7.4.5) and MIT licensing. Report issues via GitHub [here](https://github.com/baks-dev/centrifugo/issues). Check the `baks-dev/core` repo for dependency updates, as they may impact stability.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky