gdx/p-service-bus-symfony-bundle
GDX Service Bus Symfony Bundle integrates a message bus into Symfony apps. Wire commands, queries, and events to handlers with dependency-injection support, middleware pipelines, handler autoconfiguration, and clean YAML/PHP configuration for scalable message-driven PHP applications.
Before anything else: this is a Symfony bundle, not a Laravel package. There is no composer require + auto-discovery path that binds buses and handlers into Laravel's container. Treat the bundle as reference material, and treat gdx/p-service-bus (the underlying core library) as the only thing you might pull into a Laravel app — and only if you're prepared to write the wiring yourself.
If you're evaluating it in a Symfony context (to learn the vocabulary):
composer require gdx/p-service-bus-symfony-bundle in a Symfony skeleton.config/bundles.php.php bin/console config:dump-reference p_service_bus.__invoke() method.services.yaml tag, then inject the bus into a controller and dispatch($message).debug:* for handlers) — this is the fastest way to see what the compiler pass actually wired.If you're a Laravel developer (the realistic case):
composer require gdx/p-service-bus --dry-run against your actual skeleton. Watch for symfony/* pin conflicts — Laravel transitively pins symfony/console, symfony/process, symfony/http-foundation, and a bundle requiring a different Symfony major will deadlock composer.vendor/gdx/p-service-bus/src and answer: does the core depend on symfony/framework-bundle / ContainerBuilder, or only on PSR-11/PSR-14? If it's ContainerBuilder, stop — the cost of adapting handlers to Laravel's container is not worth it.First thing to look at: the DependencyInjection/ folder — the extension and any compiler passes. That tells you exactly what the bundle does to the container and, therefore, what you'd have to reimplement in a Laravel ServiceProvider.
The bundle's native patterns (Symfony):
#[AsCommandHandler]-style attribute on __invoke() is the idiomatic registration path. Keeps handler classes free of services.yaml edits and lets Symfony autowiring resolve constructor dependencies (repositories, loggers, clocks).services.yaml and let the compiler pass collect them into the bus's handler map.logging → validation → transaction → retry → dead-letter. Put cross-cutting concerns here rather than in handlers — the whole point is that handlers stay single-purpose.Laravel-side patterns (if you commit to the core library):
App\Bus\CommandBus and App\Bus\EventBus interfaces in your app. Bind the PServiceBus adapter behind them in a ServiceProvider. This lets you swap to Laravel's native queue dispatch (or Symfony Messenger in a Symfony sibling service) without rewriting call sites.config/pservicebus.php map of message => handler and resolve handlers through Laravel's container — this is the single most important adaptation. Add a boot assertion that every mapped handler resolves, because failures otherwise surface at consume time in production.DB::reconnect() per iteration, explicit memory ceiling, graceful shutdown on SIGTERM.correlation_id, log it on publish/consume/ack/nack. This is cheap and invaluable the first time a message goes missing.ContainerBuilder semantics have no analogue in Laravel's ServiceProvider model. The bundle's artifacts are inert. Only the core library is potentially relevant, and it's unverified whether it's PSR-clean.dev-main VCS entry. An untagged dependency is a reproducibility and supply-chain risk — do not accept it for production. Run composer why-not on any conflict before debugging by hand.type + version field) or write tolerant readers. This bites in weeks, not months.cache:warmup. In a Laravel adapter, misconfigured handlers fail at consume time in production. Add a startup self-check that resolves every registered handler — this is the single highest-value five lines of code you'll write.DB::reconnect, memory ceiling + restart policy in Supervisor. This isn't specific to the package, but it's where every first Laravel bus adapter dies.artisan bus:inspect command that lists message => handler and attempts resolution. You'll use it constantly during onboarding.ContainerBuilder, that's your signal to abandon the integration.How can I help you explore Laravel packages today?