mops1k/adr-bundle
mops1k/adr-bundle is a Symfony bundle for the Action-Domain-Responder pattern, separating request actions, domain logic, and response handling to keep controllers small and application code organized and maintainable.
Scope of this assessment: Based solely on the v0.0.2 release note ("Add support for directory route loading for actions") and the package's implied purpose. No source, test suite, or documentation has been inspected. Confidence in the specifics below is low; confidence in the shape of the risk is moderate.
Inferred architecture fit. The package appears to provide convention-based route registration for single-action (invokable) controller classes — the "action" pattern common in Laravel codebases and popularised by packages such as lorisleiva/laravel-actions. v0.0.2 adds the ability to point at a directory of action classes and have routes registered for all of them, rather than enumerating each class individually. This sits on top of Laravel's RouteRegistrar/Route facade and the service container, which is a well-trodden extension point. Nothing here requires forking framework internals, so architectural fit with a standard Laravel app is likely good — provided the implementation hooks the route registration phase correctly and cooperates with route:cache.
Integration feasibility. Low-to-moderate effort for a greenfield service or a bounded module; higher for an existing application with a hand-curated routes/web.php, because discovered routes must coexist with explicit ones and route precedence in Laravel is registration-order dependent. The feature is opt-in by directory, which is a genuinely good adoption property: we can mount discovery under a prefix and middleware group and leave the rest of the routing untouched. The main integration tax is convention discipline — class namespace and filename now determine the public URL surface.
Technical risk.
php artisan route:cache or pay a scan cost per request. This is the single highest-severity unknown.auth middleware at minimum, plus review of the discovery root).Key questions to resolve before adoption.
route:cache produce a complete, stable artifact?handle signature, or attributes?Route::middleware()/prefix()/name() group, and can names be assigned deterministically?Stack fit. Assumes Laravel 10–12 and PHP 8.1+. Best fit for teams already committed to the action/invokable-controller pattern; poor fit for teams using resource controllers and explicit route files, where it would introduce a second, competing routing idiom.
Migration path. Do not migrate existing routes. Adopt additively:
"vendor/pkg": "0.0.2") — never a caret range on a 0.0.x line.app/Domain/Billing/Actions) and register it inside one route group carrying the target prefix, web/api middleware, auth, and rate limiting.routes/web.php authoritative for everything else.Route::get(...) loop or a first-party equivalent if the dependency stalls.Compatibility checks to gate on. route:list output parity before/after; route:cache then route:clear round-trip in staging; behaviour under Octane if used; behaviour when the discovery directory is absent (should no-op, not throw); coexistence with any existing auto-discovery package.
Sequencing. (1) Timeboxed spike — one afternoon, one small domain, confirm cache behaviour and naming rules. (2) Route-assertion tests in CI (a test that asserts the expected route set for the discovered directory, so silent disappearance is caught). (3) Documentation of the naming convention in the repo's contributor guide. (4) Roll out to one bounded domain. (5) Re-evaluate at v0.1.0 or first breaking change; only then consider broad adoption.
Maintenance. Expect churn. A 0.0.x package can change its registration API in a patch release; budget a recurring small upgrade task and keep the adapter layer thin so churn is absorbed in one file. Track release notes deliberately rather than relying on Composer to surface them.
Support. No vendor SLA. Ownership should be assigned to a named engineer or team; if the package is load-bearing for routing, an internal fallback (a ~20-line explicit registration loop) should be documented as the exit path. Exit cost is low today precisely because adoption is additive — preserve that property.
Scaling. Two dimensions. Codebase scale: boot-time discovery cost grows linearly with the number of action files; negligible at tens, worth measuring at hundreds, and mitigated entirely by route caching. Traffic scale: no expected per-request impact if caching is correct — this is a routing-table concern, not a hot-path concern.
Failure modes to monitor.
route:cache runs in the deploy pipeline, not at container start.route:list diffing in staging.Ramp-up. Low for anyone fluent in Laravel routing; the learning cost is almost entirely the naming convention, not an API. One short internal write-up plus a worked example should be sufficient for a mid-level engineer. The subtler ramp-up cost is conceptual: developers must internalise that directory placement is a deployment decision, which is a meaningful shift from explicit route files and warrants deliberate framing in onboarding.
How can I help you explore Laravel packages today?