juststeveking/signal
Signal is a lightweight Laravel package by Steve King that provides a clean, expressive API for defining and dispatching application signals, helping you decouple components and react to events with simple, testable PHP code.
Controller, Action, Job, Listener, Service, Repository, Query, Aggregate, ValueObject, …) plus metadata (DependsOn, Emits, ListensTo, SideEffect, Throws, Route, Authorize, Validates, Cached, Deprecated, Internal) produces machine-readable output that is generated from source and therefore cannot silently rot. That is the difference between a wiki page nobody trusts and an artifact you can diff in CI.DependsOn turns architectural opinions into lint surface: "no Controller may depend on a Repository directly," "every Job must declare a queue," "every Route must carry an Authorize unless tagged public." This converts recurring code-review arguments into a build failure — a process decision, not an engineering one, and one that needs PM sponsorship because it will initially block merges.SKILL.md is written for a coding agent with explicit "do not refactor" instructions, which means annotation can be drafted cheaply per module and reviewed by humans. That changes the cost curve on a documentation initiative from "weeks of senior time" to "review time only."SKILL.md describe an attribute/annotation library with no service provider, no config, and no runtime behaviour. #[Route] does not register routes; #[Authorize] does not authorize; #[Emits] does not dispatch. Do not let a roadmap line item be written against the marketing copy. Confirm which surface you are adopting before any commitment.Adopt when:
#[Route] next to routes/api.php, #[Cached(ttl:) next to cache()->remember(), #[Deprecated] next to @deprecated — PHP won't complain, so your reviewers must. Pick winners up front.Look elsewhere when:
illuminate/events, the router, or queue middleware. This package is the wrong layer.#[Throws] or #[Emits] annotations are worse than none because they get trusted. If there is no review checklist item and no periodic sweep, skip it.To executives: This is a low-cost, fully reversible experiment in making our architecture machine-readable. We install a small MIT-licensed annotation vocabulary, spend roughly one engineer-week building a generator that turns it into a live service catalog and dependency report, and pilot it on a single module. Success criteria are concrete: the catalog is generated rather than curated, and one architectural rule is enforced automatically at merge time. Failure costs us an afternoon of uninstall — the annotations are inert and there is no runtime coupling. It is not a platform bet; it is a documentation initiative with a measurable exit.
To engineering: Signal is metadata, not magic. It ships no service provider and no runtime behaviour — attributes are inert until we write a reader, which is about fifty lines of reflection. That's the whole product. What it buys us is a single, consistent vocabulary for describing what a class is and what it touches, written next to the declaration so it can't drift into a wiki. We then generate our architecture docs from source and, once the inventory is trustworthy, promote one or two long-running review arguments into CI rules. Two things to internalize before we start: pin ^1.0.1 (v1.0.0 shipped a broken autoloader specifically for the installed-as-dependency case, which is exactly how we consume it), and read skills/signal/SKILL.md before annotating anything — it is the authoring standard, and inventing a second convention alongside it defeats the purpose. Critically: #[Authorize] and #[Validates] describe checks the code must actually perform. They enforce nothing. We will say that loudly in the style guide, because a new engineer assuming otherwise is a security-shaped hazard, not a documentation nit.
How can I help you explore Laravel packages today?