serendipity_hq/commands-queues-bundle
Symfony bundle for queuing and running console commands as background jobs. It helps dispatch commands to a queue, process them asynchronously, and manage workers, making long-running PHP tasks easier to offload without blocking web requests and keep responses fast, with a simple, framework-friendly...
Important framing correction: despite being evaluated in a "Laravel/PHP package" bucket, this is a Symfony bundle (SerendipityHQ CommandsQueuesBundle), not a Laravel package. Its value proposition is a Doctrine-backed queue for Symfony Console commands — persist a command + arguments in a table, then drain it sequentially with a worker command. There is no ServiceProvider, no facade, no Laravel Job contract, and no publishable config in the Laravel idiom. Any evaluation must start there.
Architecture fit: Poor for direct integration, moderate as a design reference. The bundle assumes the Symfony Kernel, bundle registration in AppKernel/bundles.php, the Symfony DI container, Doctrine ORM entity mapping, and Console Application/Command lifecycle. Laravel's container, console kernel, and queue subsystem are structurally different. Forcing this in means booting a second framework kernel inside a Laravel app — an architecture smell that trades a solved problem (Laravel Queues) for a bespoke one.
Integration feasibility: Technically possible, practically discouraged.
symfony/* components. Laravel 10/11 ship Symfony 6/7 components; a bundle of this vintage likely constrains to Symfony 2/3/4 and older Doctrine. Composer will almost certainly refuse to resolve, and --ignore-platform-reqs/replace hacks are a production anti-pattern.Technical risk: High.
failed_jobs semantics, no WithoutOverlapping, no horizon-style supervision, no queue priorities beyond what the bundle implements privately.Key questions to answer before any commitment:
composer.json constraints for php, symfony/*, and doctrine/*? Does a composer require --dry-run against our target Laravel version resolve at all?processing forever?database queue driver plus Process does not?If Q6 has no crisp answer, the correct decision is "do not integrate."
Stack fit: Laravel is the wrong host for this artifact; Symfony is the right one. If the estate is Laravel-first, treat the bundle as prior art, not a dependency. Its genuine idea — a durable, inspectable, DB-backed queue for shell commands that is operable without Redis/RabbitMQ — maps cleanly onto constructs Laravel already ships.
Recommended approach (concept port, not package adoption):
database queue driver (or a small custom queue_jobs-style table if we want command-shaped payloads and admin visibility).Job class that builds a Symfony\Component\Process\Process, sets an explicit setTimeout(), captures stdout/stderr, and throws on non-zero exit so Laravel's retry/backoff/failed-job machinery engages.WithoutOverlapping middleware for commands that must not run concurrently, plus onQueue()/onConnection() for lane separation (mirroring the bundle's "queue" concept).artisan queue:work --max-time under Supervisor/systemd; this replaces the bundle's worker command directly and is a well-trodden operational pattern.Artisan::queue() or a Kernel::schedule() entry rather than a Symfony console invocation table.If direct reuse is mandated (e.g. existing Symfony service must be shared): Run the bundle in its native Symfony application as an isolated worker process writing to a shared database, and have Laravel interact only through that table via a thin repository. Enforce a single owner of migrations for that table (Symfony side), and have Laravel read-only plus a narrow, documented insert path. Do not attempt to boot the Symfony kernel inside Laravel.
Compatibility gates (must pass, in order):
composer require serendipity_hq/commands-queues-bundle --dry-run against the target Laravel version — hard fail if it does not resolve.php -l / PHPStan level 5 over the installed vendor tree; confirm no deprecated PHP constructs (dynamic properties, each()-era patterns) on our PHP version.commands_queue table.processing rows, or a documented reconciliation command.Sequencing:
composer.json, README, and the worker command source. Run the dry-run resolve. Publish a go/no-go memo.Job + Process. Compare lines of code, failure handling, and observability.Maintenance: This is the decisive factor. Ten stars and zero dependents means effectively no downstream validation — we would be among the first production consumers. Assume unmaintained: budget for a vendored fork (repositories with a VCS entry, or a patches file) and for owning security and PHP-version upgrades ourselves. If we cannot staff that, do not take the dependency. The Laravel-native port has zero external maintenance surface and inherits Laravel's release cadence.
Support: Single-maintainer project with no evident commercial backing. No SLA, no security disclosure process, unknown issue response latency. Internal escalation path must be "we fix it," which means the real cost of adoption is a part-time maintainer, not a composer require.
Scaling:
--max-time to bound memory growth.Failure modes to instrument from day one:
processing rows after worker crash — add a reconciliation sweep that ages out rows past a threshold.Process::setTimeout() explicitly; the bundle may not.--max-time and restart.Ramp-up: Non-trivial for a Laravel-first team. Required knowledge: Symfony bundle registration and DI configuration, Doctrine ORM entity/migration lifecycle, Symfony Console command and event internals, and Composer constraint resolution across two framework generations. Realistically 2–4 days of a senior engineer to reach confident operation, versus roughly half a day for the Laravel-native equivalent using Bus, Process, and Supervisor. That delta alone usually settles the build-vs-adopt question.
Net TPM recommendation: Do not adopt as a dependency for a Laravel application. Use it as a documented reference implementation for a DB-backed command queue and ship the Laravel-native equivalent. Revisit only if the organisation standardises on Symfony, at which point the bundle deserves a fresh evaluation against Symfony Messenger — which, notably, already covers this ground with active maintenance and a large adopter base.
How can I help you explore Laravel packages today?