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

Supervisor Laravel Package

supervisorphp/supervisor

PHP client and wrapper for controlling Supervisor via its XML-RPC API. Manage processes, start/stop/restart programs, read status and logs, and integrate Supervisor control into Laravel or any PHP app with a simple, fluent interface.

View on GitHub
Deep Wiki
Context7

PHP library for managing Supervisor through XML-RPC API

Frequently asked questions about Supervisor
How do I install supervisorphp/supervisor in a Laravel project?
Run `composer require supervisorphp/supervisor` in your project directory. The package provides a PHP client for Supervisor’s XML-RPC API, so ensure Supervisor is installed and configured with XML-RPC enabled (e.g., `rpcinterface:unix:///tmp/supervisor.sock` in your Supervisor config).
Can I use this package to restart Laravel queue workers automatically?
Yes. The package lets you restart processes programmatically, such as queue workers. For example, you can trigger a restart via an Artisan command or Laravel event listener when a job fails or the worker becomes unresponsive.
What Laravel versions does supervisorphp/supervisor support?
The package is framework-agnostic but integrates seamlessly with Laravel. Test thoroughly with your Laravel version (e.g., 10.x or 11.x), as the last release was in 2022. PHP 8.0+ compatibility is likely, but verify with your setup.
How do I configure Supervisor’s XML-RPC socket for Laravel?
Edit your Supervisor config (e.g., `/etc/supervisor/conf.d/supervisord.conf`) to include `rpcinterface:unix:///tmp/supervisor.sock` and ensure the socket path is accessible by your Laravel process. Permissions may require adjustments (e.g., `chmod 777 /tmp/supervisor.sock`).
Is there a way to integrate this with Laravel’s scheduler or Horizon?
Absolutely. Use the package to dynamically manage processes tied to Laravel’s scheduler or Horizon. For example, restart a stalled queue worker after a scheduled event or when Horizon detects a failure.
What happens if the Supervisor XML-RPC connection drops during a Laravel request?
Implement retry logic or fallback mechanisms in your Laravel code. The package itself doesn’t handle retries, so wrap calls in a try-catch block or use Laravel’s `retry` helper for transient failures.
Can I use this package for managing external PHP processes, not just Laravel tasks?
Yes. The package is designed to manage any Supervisor-controlled process, including external PHP scripts or microservices. Just define the process name in your Supervisor config and use the client to control it.
Are there alternatives to supervisorphp/supervisor for Laravel?
You could use native Supervisor CLI commands via Symfony’s `Process` component or direct XML-RPC calls with `curl` or `file_get_contents`. However, this package abstracts complexity and provides Laravel-specific integrations like Artisan commands and service providers.
How do I test Supervisor interactions in my Laravel application?
Mock the Supervisor client in your tests using Laravel’s `Mockery` or PHPUnit. Verify process states (e.g., `getState()`) and actions (e.g., `restart()`) without hitting the actual Supervisor instance. Use a test socket path in your config.
What permissions are needed for Laravel to interact with Supervisor’s socket?
The Laravel process must have read/write access to the Supervisor socket (e.g., `/tmp/supervisor.sock`). Adjust socket permissions (e.g., `chmod 777`) or run Laravel with the same user as Supervisor (check `/etc/supervisor/supervisord.conf` for `user=` settings).
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.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle