Weave 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

Worker Laravel Package

roadrunner/worker

Core PHP worker package for RoadRunner that provides the Worker API, payload handling, and stdin/stdout communication with the RoadRunner server. Use it to build custom long-running workers and integrate them with RoadRunner's high-performance Go runtime.

View on GitHub
Deep Wiki
Context7

roadrunner/worker provides a lightweight PHP worker implementation for RoadRunner, the high-performance application server. It bridges PHP code with the RoadRunner process over the Goridge protocol, handling request payloads and returning responses while keeping workers alive across requests.

  • PSR-7-compatible request/response handling
  • Worker lifecycle and loop management
  • Payload serialization and deserialization
  • Error and exception propagation
  • Drop-in integration with RoadRunner configs
Frequently asked questions about Worker
What is roadrunner/worker and what does it actually do?
It is the base PHP worker for the RoadRunner application server. The worker receives payloads over the Goridge protocol, dispatches them to your application code, sends responses back, and manages the worker pool lifecycle. It is a low-level runtime component rather than an application-level library, and it is framework-agnostic with PSR-7 and PSR-17 oriented interfaces.
How do I install roadrunner/worker with Composer?
You install it with composer require roadrunner/worker. In most Laravel setups you will not add it manually, because it arrives transitively through Laravel Octane's RoadRunner driver or a bridge package. Confirm your bridge supports the new roadrunner/worker name before requiring it explicitly, since a bridge still pinned to spiral/roadrunner-worker can cause a dependency conflict or a duplicate vendor tree.
Is roadrunner/worker the same package as spiral/roadrunner-worker?
Yes. As of v3.8.0 the package is formally named roadrunner/worker, previously spiral/roadrunner-worker, so treat the change as an identity move rather than a rewrite. Check that bridge packages, internal allowlists and vulnerability scanner rules reference the new name, otherwise the package can quietly drop out of your supply-chain visibility. Ask the bridge maintainers about the EOL timeline for the old name.
Does roadrunner/worker work with Laravel and Laravel Octane?
Yes, but indirectly. Laravel teams usually reach RoadRunner through Octane's RoadRunner driver or a bridge package that pulls this worker in transitively. The package itself is framework-agnostic, so Laravel-specific bootstrapping, configuration and lifecycle hooks come from the adapter layer rather than from this repository.
Which PHP and Laravel versions does roadrunner/worker support?
Version 3.8.0 raises the minimum PHP requirement to 8.2. The package does not target a specific Laravel version because it is framework-agnostic, so Laravel compatibility is determined by Octane or your bridge package. Verify the PHP 8.2 floor against your minimum supported runtime before updating, because a transitive bump can silently block composer update on older services.
Do I need to require roadrunner/worker directly in a Laravel application?
Usually no. Application code should not reference the worker directly, because it is an implementation detail of the RoadRunner adapter. Requiring it explicitly only makes sense if you are writing a custom worker bootstrap, which should be a deliberate architecture decision rather than an incidental composer require.
How does the PHP worker communicate with the RoadRunner server binary?
The worker runs as a long-lived PHP process that speaks the Goridge protocol to the RoadRunner Go binary. It reads request payloads from the socket, hands them to your handler, and writes the PSR-7 response back over the same channel. Because the binary and the PHP worker are versioned separately, keep them on compatible releases to avoid protocol mismatches.
How do I prevent state leaking between requests in long-running RoadRunner workers?
Persistent workers keep singletons, static state and open database connections alive across requests, so anything request-scoped must be reset. Avoid storing request data on long-lived objects, clear container bindings and authenticated user state per request, and be careful with connection pooling. Treat this as a correctness and security concern rather than a minor bug class.
How do I test an application that runs on RoadRunner workers?
Test your handlers as ordinary PHP or Laravel code, since the worker only delivers payloads and returns responses. For end-to-end coverage, run the actual rr binary against your application and exercise the request lifecycle, including error paths and worker restarts. Also run repeated requests through the same process to catch state leaking between calls.
What are the alternatives to roadrunner/worker, and is it actively maintained?
Alternatives include Laravel Octane with the Swoole or FrankenPHP drivers, or staying on classic PHP-FPM. Maintenance looks active, since v3.8.0 combines a rename, a PHP floor raise and refactoring, but adoption signals are weak because this is a low-level component consumed transitively rather than installed directly. Note that a rename typically resets adoption metrics, so low star counts and dependent numbers should not be read as the package being unused.
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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle