miksoftware/daemon-bundle
Miksoftware DaemonBundle provides a Symfony-friendly foundation for building long-running PHP daemon and worker commands, with structured loops, lifecycle handling, and graceful shutdown support for background jobs and queue processing.
Architecture fit: Poor for a Laravel-first stack. Despite the "PHP package" framing, miksoftware/daemon-bundle is a Symfony bundle — the naming, DependencyInjection/ conventions, and bundle registration model all point to Symfony Kernel wiring, not a Laravel service provider. There is no composer.json evidence of Laravel auto-discovery, facades, or publishable config. For a Laravel team, the only realistic architectural role is as an internal reference implementation for how to structure a signal-aware long-running worker, or as a hand-wired dependency inside a single Artisan command. It should not be positioned as infrastructure.
Integration feasibility: Low. Two blockers stack: (1) framework mismatch — Laravel already ships queue:work, schedule:run, and Horizon, each with graceful shutdown, --max-time, timeouts, and restart semantics; (2) license ambiguity — NOASSERTION means the terms are not machine-readable and legal must read the actual LICENSE file before any commercial use. Neither blocker is fatal in isolation; together they mean this is a time-boxed spike or a read-only reference, never a committed dependency.
Technical risk: High. The signals are unambiguous: 5 stars, 0 dependents, NOASSERTION license, no CI/security signals visible, and the surrounding assessment scoring is uniformly low. Single-maintainer risk, unclear release cadence, and no downstream validation mean the code review is the due diligence. Compounding this, long-running PHP processes carry well-known hazards — memory growth, MySQL server has gone away, missed signal dispatch without pcntl_async_signals(true), orphaned processes on deploy — and adopting a low-adoption library means owning the debugging of those hazards without community backup.
Key questions:
LICENSE file actually say? Can we use, modify, and redistribute it commercially?pcntl_signal plus a while (true) loop?SIGTERM during in-flight work?Stack fit: Weak. Laravel teams should treat the framework-native path as the default: queue:work for queued work, schedule:run for periodic work, Horizon where visibility into queues matters, and Supervisor/Kubernetes for process supervision. The bundle only earns a place if we have a genuinely non-queue requirement — socket listener, streaming consumer, or persistent-connection poller where at-least-once per-message semantics are awkward. Even then, the integration would be hand-wired, not idiomatic.
Migration path: None worth planning at this maturity — there is nothing to migrate to. If a spike succeeds, the correct path is to wrap the dependency behind an internal interface (e.g. a DaemonRunner contract with run(), stop(), tick()), so the bundle is an implementation detail we can swap for a Supervisor-managed Artisan command or a homegrown runner later. Do not build the abstraction speculatively; build it only after a spike proves differentiated value.
Compatibility: Must be validated before any code lands. Check composer.json for Symfony component ranges, PHP version floor, and whether it requires extensions (pcntl, posix) that may be unavailable in our container image. Confirm Unix-only assumptions, since pcntl is not available on Windows and our CI may run on a non-POSIX runner. Verify behavior on read-only filesystems if it writes PID files, and confirm it plays nicely with containerized restart semantics.
Sequencing:
LICENSE file — this gates everything, and NOASSERTION means the answer is not in the metadata.composer.json, DependencyInjection/, base worker class, README. Roughly half a day.SIGTERM by finishing the in-flight row and exiting 0. Run foreground, Ctrl-C, verify exit code and idempotency.wait_timeout reconnect.Maintenance: High ownership burden relative to a marginal saving. With zero dependents, assume we may need to maintain a fork. Budget for dependency bumps, PHP/Symfony compatibility fixes, security review, and the eventual "the maintainer stopped responding" conversation. The honest comparison is not "adopt vs. build from scratch" — it is "adopt a fork we maintain vs. write ~200 lines of pcntl plumbing we fully control."
Support: Effectively community-of-one. Incidents will require internal expertise in Unix signals, graceful shutdown semantics, pcntl behavior, and process supervision. Without that expertise on the team, daemon failures present as mysterious hangs and orphaned processes that are slow and expensive to diagnose under production pressure.
Scaling: The package does not solve horizontal scaling. It provides the in-process lifecycle layer; supervision, restart, scale-out, and health checking still belong to Supervisor, systemd, or Kubernetes. A TPM should confirm whether it adds anything at the process-management layer or merely duplicates existing infrastructure — the latter is the likely answer for a Laravel shop.
Failure modes: Expect the classic long-running-PHP set: orphaned daemons after deploy, restart loops on a poisoned message, unbounded memory growth from Doctrine/Laravel accumulator patterns, unhandled signals (especially without pcntl_async_signals), lost logs on abrupt termination, deploy-time race conditions between old and new workers, and stale DB connections after wait_timeout. These are operationally expensive precisely because they surface only under load or during a release window.
Ramp-up: Medium to high. Engineers must learn the bundle's conventions plus the underlying daemon model plus whatever supervision we pair it with. For a zero-dependent, license-ambiguous package, that ramp-up is not justified unless the capability is genuinely strategic.
TPM recommendation: Hold. Do not add as a dependency. Treat miksoftware/daemon-bundle as a source-audit reference for daemon lifecycle patterns and, at most, a tightly scoped spike behind an internal abstraction. Prefer Laravel-native queue/Horizon/Supervisor patterns for anything on the critical path. Revisit only if (a) legal clears the license, (b) a concrete non-queue daemon requirement lands on the roadmap, and (c) we consciously accept fork-and-maintain ownership.
How can I help you explore Laravel packages today?