kitano/connection-bundle
Symfony bundle for managing multiple database connections. Configure named connections, switch between them at runtime, and centralize connection setup—useful for multi-tenant apps or services that need to talk to more than one database.
Architecture fit. This is a Symfony bundle, not a Laravel package. That single fact drives the entire evaluation. The codebase splits cleanly into (a) Symfony kernel glue — Bundle class, DI container extension, configuration tree — which is inert in Laravel, and (b) the domain core: a directed graph of typed connections between arbitrary objects (manager, repository, connection entity). Only (b) is portable. Framed as a Laravel dependency the answer is no; framed as a reference design for an adjacency edge model it has genuine value. The TPM's job is to keep those two framings separate in every conversation.
Integration feasibility. A composer require will not work on a modern Laravel stack. The realistic path is either (i) port the non-Symfony portion into an internal Eloquent-based package, or (ii) skip the code and write the edge table + traversal yourself. Option (ii) is often cheaper: the surface area is small — an edge entity, a manager, a BFS walk. The port is a spike, not a task, and must be estimated as such before it enters a roadmap.
Technical risk. Concentrated in abandonment, not in code quality. 13 stars, 0 dependents, no release cadence, dormant vendor. There is no CVE response path, no maintainer to escalate to, and no peer community to compare notes with. Secondary risks are structural: PHP 5.x-era composer.json constraints that will hard-conflict with our PHP 8.1+ floor, Doctrine ORM coupling we do not want, polymorphic edges that cannot carry foreign keys (orphan rows on delete), N+1 when expanding a node, and no cycle-detection guarantees in traversal.
Key questions.
composer.json actually pin? Can it even resolve against our baseline?morphToMany) satisfy it?Stack fit. PHP yes, Laravel no, Symfony only on EOL branches. The correct posture is "reference implementation and source of domain logic," explicitly not a runtime dependency. If the domain need is real, the deliverable is an internal Eloquent package modeled on this design, not a vendored bundle.
Migration path / sequencing.
composer.json. If constraints conflict with our PHP/Laravel baseline and no maintained fork exists, the port conversation is over before it starts. Do this before any other work — it can invalidate the whole effort in an hour.(source_type, source_id, target_type, target_id, type, meta, created_at) plus a BFS with visited set and max-depth guard, building in-house is frequently cheaper and materially safer than resurrecting 2015 vendor code. Present both estimates side by side.Bundle class and DI extension, add declare(strict_types=1), migrate Doctrine mappings to Eloquent, add a service provider with singleton bindings and publishable config, stand up CI. Any residual Doctrine coupling is a stop sign — do not attempt a Doctrine-plus-Eloquent "temporary" bridge; it becomes permanent and doubles the persistence surface.Compatibility and sequencing constraints. The PHP-version gate must clear before port work begins. Schema decisions (composite indexes on (source_type, type) and (target_type, type), unique constraint on the full edge tuple) must be locked before any data is written — retrofitting a unique index over duplicate edges is a data-cleanup project.
Maintenance. Adoption means inheriting 100% of it: an assigned owner by name, a fork in org-controlled VCS, a CI matrix, PHP-upgrade work on our schedule, and an internal security triage process with no upstream feed. For a few-hundred-LOC library this is affordable — but it must be budgeted and named in the ADR, never assumed.
Support. Effectively zero. No maintainer, no issue triage, no community. New hires will not recognize the package and will find no documentation beyond a README. The onboarding tax is the real long-tail cost, and it compounds with every engineer who touches the graph path.
Scaling. Shallow adjacency lookups are fine on Postgres/MySQL 8, especially with recursive CTEs at the DB layer and batched whereIn per hop at the application layer to kill N+1. If the roadmap genuinely needs multi-hop shortest path or recommendations over millions of edges, this library — and honestly any ORM-based edge table — is the wrong tool; the answer is Postgres AGE, Neo4j, or a dedicated graph service. Scope the decision to the query patterns we actually have, not the ones we might imagine.
Failure modes to instrument.
Ramp-up. The code itself is learnable in a day. The organizational cost is what to plan for: undocumented resurrected vendor code raises onboarding tax indefinitely. An ADR, inline documentation, and a named owner are preconditions of adoption, not follow-ups.
Recommendation. Do not add as a Laravel dependency. Use it as a design reference and default to a small internal Eloquent directed-edge service with traversal guardrails, unique composite indexes, and integrity jobs. Fork only if the spike proves the domain logic is substantially richer than a table plus a BFS — and only with a named owner and a stated maintenance budget.
How can I help you explore Laravel packages today?