graham-campbell/manager
Laravel Manager is a package by Graham Campbell that provides reusable manager functionality for Laravel applications, helping you build and organize driver-based managers and related components cleanly and consistently.
Architecture fit
ConnectorInterface, ManagerInterface), one abstract class (AbstractManager), and no service provider or config file. A TPM should treat it as buying a design decision — the "manager + driver" plugin architecture — rather than buying a capability. The roadmap item stops being "design a multi-provider abstraction" and becomes "build adapter N," which is far easier to scope, estimate, and defend.ManagerInterface contract (connection, reconnect, disconnect, getConnectionConfig, getDefaultConnection, setDefaultConnection, extend, getConnections) is the internal seam that makes vendor portability a committed line item instead of a slide.Illuminate\Support\Manager. The differentiator here is connection lifecycle — pooling, forced reconnect(), disconnect(), and runtime default switching, i.e. DB-manager semantics rather than one-shot driver resolution. If your requirement is only "pick a driver from config," the framework primitive may be enough and this package is redundant.Integration feasibility
AbstractManager requires exactly two protected methods (createConnection, getConfigName), so the per-adapter surface is narrow and predictable. That makes adapter work parallelizable across engineers and easy to unit-test in isolation.__call proxy to the default connection (calling ->methodName() instead of ->connection()->methodName()) is convenient but hides the call graph. Flag it in review standards: prefer explicit connection() calls in domain code so static analysis and IDE navigation keep working.Technical risk
AbstractManager ties your manager classes to a third-party base class. Mitigation is cheap: implement ManagerInterface directly, or keep your own façade in front so the package never appears in application-layer signatures. Estimate the fork cost now — the codebase is small, so "maintainer stops" degrades to a bounded, forkable risk rather than a rewrite.reconnect()/disconnect() exist but nobody calls them for you. This is the most likely production failure mode and belongs in the runbook, not just the code review.Key questions for engineering
Illuminate\Support\Manager sufficient?AbstractManager or implement ManagerInterface? This is a reversibility decision, not a style one.extend() from becoming a hidden override mechanism that tests and tenants rely on invisibly?Stack fit
^5.3; the v4.x line tops out at Laravel 9 and should not appear in new work.Migration path
Compatibility
getConfigName()), so naming collisions are the only foreseeable integration friction — enforce a config-key convention up front.ConnectorInterface is unused by this package but consumed by sibling packages (Flysystem et al.). If you plan to interoperate with those, adopting the same connector shape buys free reuse of existing adapters.Sequencing
connection() reuse and reconnect() behavior (1–2 days).Maintenance
Support
Scaling
Failure modes
reconnect() on error paths and document the pattern; add an alert on connection-level exceptions that cluster after idle periods.extend() — a runtime-registered creator can override a configured driver, and nothing announces it. Mitigation: restrict extend() to tests and explicit feature-flag paths; grep for it in review.__call obscuring errors — exceptions surface from the default connection when the reader expects a local method. Mitigation: prefer explicit connection() in domain code, and forbid __call reliance in shared libraries.Ramp-up
How can I help you explore Laravel packages today?