graham-campbell/manager
Laravel Manager provides a lightweight base for building driver-based “manager” services in Laravel apps. Supports PHP 7.4–8.5 and Laravel 8–13, offering consistent configuration, driver creation, and resolution patterns for your own integrations.
extend() and method chaining (e.g., $manager->methodName() instead of $manager->connection()->methodName()), reducing verbosity.AbstractManager requires implementing createConnection() and getConfigName(), which may need tailored logic.ManagerInterface for lightweight integration if full AbstractManager isn’t needed.extend() method enables runtime driver registration, which is useful for plugin architectures or SaaS multi-tenancy.Illuminate\Support\Manager (used in Eloquent, Cache) or custom solutions (e.g., a lightweight connection pool).Manager-wrapped implementation.ManagerInterface methods (e.g., getConnectionConfig()).__call magic for method chaining (e.g., $manager->upload() instead of $manager->connection()->upload()).pdo_mysql for database connectors).ConnectorInterface for connectors).config/manager.php (if used) doesn’t clash with existing config keys.extend().disconnect()).us-east-1.s3, eu-west-1.s3) via connection naming.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Connection Pool Exhaustion | App crashes if all connections are in use. | Implement connection limits or dynamic scaling. |
| Driver-Specific Errors | One driver fails, breaking the manager. | Use circuit breakers or fallback drivers. |
| Config Misconfiguration | Invalid config breaks all connections. | Validate configs early (e.g., in createConnection()). |
| Stale Connections | Reused connections are no longer valid. | Implement TTL-based reconnection or reconnect(). |
| Package Abandonment | Maintainer stops updates. | Fork the package or migrate to a maintained alternative. |
How can I help you explore Laravel packages today?