cartalyst/resource-watcher
Resource Watcher lets Laravel apps monitor files and other resources for changes, dispatching events when modifications are detected. It offers a simple watcher API with periodic checks, handy for cache busting, asset tracking, or reacting to config and template updates.
inotify extension. That makes cross-platform developer tooling a product-visible constraint (macOS/Windows teammates, Docker Desktop bind mounts), not just an engineering detail—budget for a fallback or a documented OS limitation before committing.Worth evaluating when:
inotify/fswatch is unavailable or unreliable—or your team accepts the Linux-only constraint for dev tooling with a documented fallback.Look elsewhere when:
spatie/file-system-watcher, which wraps fswatch) or, for frontend assets, letting Vite/Node tooling watch entirely.src/ and the composer constraints before assuming.To executives: This is a small, permissively licensed utility for detecting file changes. It is not a strategic dependency and carries no meaningful standalone upside—its only value is inside a larger feature that needs to know when files change. Adoption cost is low, but so is confidence: the project shows no ecosystem traction, so treat it as "we own it if we use it." Recommendation: do not build a roadmap item around it. If a feature needs watching, evaluate it as one option against maintained alternatives and default to those unless we have a specific reason (existing Cartalyst usage, or a polling requirement where native watchers are unavailable).
To engineering: It is a thin, framework-agnostic watcher with a clean, small API and no lock-in—easy to read, easy to fork, and, best of all, easy to remove. That removability is the core argument for adopting it at all. The trade-offs must be explicit: we accept internal ownership (pin the version, plan for PHP upgrade compatibility), a Linux-only inotify dependency that is unreliable through Docker Desktop bind mounts, and the operational sharp edges (watch limits surfacing as ENOSPC, atomic-save events arriving as delete+create, no debouncing out of the box). Before adopting, confirm that spatie/file-system-watcher or Vite/Node tooling doesn't already cover the use case—in most modern Laravel stacks it will. If we do adopt: put it behind our own small watcher interface so no domain code imports the package namespace, pilot it in a dev-only command or non-critical automation with an ignore list (vendor/, node_modules, .git, storage/*) and debounce config, and keep a documented polling fallback. Promote to production only with health checks, structured logging, a restart policy, and a named internal owner.
How can I help you explore Laravel packages today?