Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Manager Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on the adapter/plugin layer. Any roadmap item that fans out to multiple backends (object storage, mail/SMS, payments, identity, CRM sync, AI inference) eventually forces a decision: design our own driver architecture or adopt one. This package collapses that decision. It ships the contracts — ManagerInterface (connection, reconnect, disconnect, getConnectionConfig, getDefaultConnection, setDefaultConnection, extend, getConnections) and ConnectorInterface — plus an AbstractManager that implements connection resolution, instance pooling, and config lookup. The PM conversation shifts from "how do we architect this?" (weeks of design review) to "which adapters, in what order?" (a scoped, estimable backlog).
  • Vendor portability as a funded line item rather than an aspiration. Because adapters are pluggable and the default connection is switchable at runtime, "we can move off Provider A" becomes a concrete engineering story instead of a slide in a risk register. This is the artifact that makes a migration contingency credible to procurement and architecture review.
  • Config-driven driver selection — the mechanism behind multi-tenant and white-label tiers. Connections resolve lazily by name from Laravel config on first use and are cached in a pool afterwards. That same primitive supports per-tenant backends, per-region data residency, per-plan capability tiers, and canary/staging providers without forking code paths. If any of those appear on the roadmap, this is the cheapest way to make them configuration rather than conditional logic.
  • Scoping an internal package or SDK effort. If the platform team is publishing Laravel packages that other squads consume, standardizing on one manager base means adapter number four costs a fraction of adapter number one, and onboarding documentation is written once. It is genuinely a small dependency — two abstract/interface families, no service provider, no configuration file — so it does not add an operational surface to own.
  • Roadmap sequencing and cost estimates for new integrations. With the scaffolding fixed, each new provider is roughly "one connector class plus one config block." That converts integration requests from open-ended research spikes into comparable, stack-rankable units of work — useful when a stakeholder asks why adding Vendor C is two days and not two sprints.
  • Honest framing of what it does not buy. It provides no driver auto-discovery, no health checks, no retry/fallback policy, no observability, no credential rotation. Those remain product and engineering decisions. Also note that Laravel core already ships Illuminate\Support\Manager; this package's increment over that is the connection-pool semantics, config-name resolution, and a published stable interface — real, but thin. A build-vs-buy memo should say so plainly rather than presenting this as a large capability purchase.

When to Consider This Package

Adopt it when most of the following hold:

  • You are writing a package, not just an application. This is infrastructure for library authors. It pays off when the manager pattern is reused — across several drivers in one package, or across several packages in one ecosystem. In a single application with a single backend, it is indirection without return.
  • Two or more interchangeable backends are already on the roadmap, or a migration is plausible within the planning horizon. One driver does not justify an abstraction layer; an abstraction layer with one implementation is a maintenance cost with no option value.
  • Connection identity, pooling, and naming matter. Per-tenant credentials, per-region endpoints, or long-lived clients that must be reused within a request are exactly the problems this solves.
  • You value a zero-ceremony footprint. No service provider, no config file, no publish step, no bootstrapping. For a package that must stay unobtrusive inside someone else's application, that is a real adoption advantage.
  • Framework-version longevity is a requirement. Current releases cover PHP 7.4–8.5 and Laravel 8–13, with a consistent, changelogged release cadence. For a package that consumers will pin across a wide Laravel range, that support matrix is the practical qualification.
  • You are already in or adjacent to this maintainer's ecosystem (Flysystem, DigitalOcean, GitHub packages), where the interfaces are a de facto shared convention and implementation examples already exist.

Look elsewhere, or build directly, when:

  • The application is the product and there is one backend. Use the vendor SDK and Laravel's service container. Reach for Illuminate\Support\Manager only if you genuinely need driver semantics.
  • You need a driver registry with discovery, lifecycle hooks, health checks, failover, or telemetry. None of that is here, and bolting it on means you now own a framework.
  • Your requirements are heavy on compliance, auditability, and supplier assurance. Single-maintainer stewardship, a small dependent count, and a modest star count are the real signals. Mitigations exist — Tidelift commercial support is offered, and the MIT license permits vendoring or forking — but that is a risk-acceptance decision, not a technical one.
  • The team is not on Laravel, or is pinned to a Laravel/PHP combination outside the supported matrix.
  • You want batteries included. This is a set of contracts. If nobody on the team wants to write connector classes, the abstraction will sit unused.

How to Pitch It (Stakeholders)

To executives and product leadership: This is a small, MIT-licensed, zero-configuration enabler that lets us add and swap third-party providers through configuration instead of rework. It does not add a service to operate, a config file to govern, or a dependency we have to babysit — no setup beyond a Composer require. The business value is optionality: it keeps vendor-migration contingency credible, makes per-tenant and per-region backends a configuration exercise rather than a codebase fork, and reduces the marginal cost of each new integration so those requests become estimable, prioritizable line items. Cost is measured in hours to low days, not sprints. Principal risk is stewardship — one maintainer, a modest ecosystem — which we mitigate through the vendor's commercial support offering or, worst case, by vendoring the code under the permissive license.

To engineering: It is a thin, honest abstraction. Two interfaces and an abstract manager providing name-based connection resolution from Laravel config, instance pooling with reuse, forced reconnect and disconnect, runtime default switching, and extend() for registering custom creators on the fly. Extending classes implement exactly two methods: createConnection() and getConfigName(). __call proxies through to the default connection, so call sites stay clean. There is no service provider and no configuration to register. It tracks PHP 7.4–8.5 and Laravel 8–13 with regular tagged releases and a changelog. Caveats worth stating up front: Laravel core already offers Illuminate\Support\Manager, so the delta is pooling semantics and a stable published contract — justify adoption on those grounds or not at all; and the package supplies no discovery, fallback, retry, or observability, so those remain ours to design. If we adopt, we own the connector implementations, the config schema, and the operational behavior around failures — this package only removes the boilerplate.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk