exsyst/worker-bundle
EXSyst Worker Bundle integrates the EXSyst Worker component into Symfony applications, letting you configure and run background workers within your Symfony project. Suitable for Symfony developers who need lightweight worker integration.
Install the component and bundle. The bundle depends on exsyst/worker, so pull both:
composer require exsyst/worker exsyst/worker-bundle
There are no tagged releases documented in the README, so expect to land on dev-master and pin a commit hash in composer.json if you need reproducibility.
Register the bundle. This is a Symfony2-era bundle, so registration goes in app/AppKernel.php:
$bundles = [
// ...
new EXSyst\WorkerBundle\EXSystWorkerBundle(),
];
Where to look first. The README is badges only — the source is the documentation. Read these in order:
DependencyInjection/ — the extension class and Configuration.php tell you the config alias (by convention exsyst_worker) and the available options.DependencyInjection/Compiler/ — this is where worker services get collected into the runtime, usually via a tag. The tag name and required interface are defined here.exsyst/worker repo itself — the WorkerInterface, JobInterface (or equivalent), and the worker/manager classes you'll implement against.First use case. Define one concrete worker as a Symfony service that implements the component's worker interface, tag it so the compiler pass picks it up, then run it through whatever console command the bundle exposes (check Command/) or by injecting the worker service into a controller/service. Start with a trivial "log a line every N seconds" worker to prove the wiring before adding real logic.
new-ing them. This is the intended integration point and gives you container-managed dependencies (Doctrine, Monolog, HTTP clients) for free.supervisor or a systemd unit to restart on exit, and have the worker exit cleanly on SIGTERM/SIGINT so the supervisor can rotate it.EntityManager (and close/reconnect) between jobs — long-running processes accumulate identity-map state and stale connections.Compiler/, DependencyInjection/Configuration.php and the tests, not by guessing from the bundle name.composer.json constraints before dropping it into a Symfony 3/4/5 project — autoloading, bundle registration and container APIs changed. If you're on a modern Symfony, symfony/messenger is the maintained equivalent and probably the better choice for greenfield work.app/console debug:container --tag=<tag> and confirm the service implements the exact interface the pass requires (including namespace).--max-jobs/--max-time) and let the supervisor restart, or call gc_collect_cycles() periodically.How can I help you explore Laravel packages today?