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

Connection Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • What PHP/Symfony/Doctrine versions does composer.json actually pin? Can it even resolve against our baseline?
  • Is traversal in-memory or query-per-hop? What is the worst-case query count for a depth-3 expansion?
  • Does our domain require typed, directed, attributed edges, or would a polymorphic pivot (morphToMany) satisfy it?
  • What is the realistic edge count and traversal depth — thousands or millions?
  • Who owns the fork if we adopt, and what is the license?
  • Does a test suite exist, and does it pass on PHP 8.x?

Integration Approach

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.

  1. Version gate first (hours). Read 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.
  2. Spike (2–3 days). Read the manager and repository code, count LOC outside the Symfony layer, benchmark a depth-3 walk against a seeded edge table. Output: go/no-go on porting versus building.
  3. Build-vs-fork decision. For a schema of (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.
  4. If forking: vendor under org namespace, strip the 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.
  5. Rollout. Feature-flag it; dual-write alongside any legacy relation; shadow-compare reads before cutting over.

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.

Operational Impact

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.

  • Cycles → infinite traversal. Visited set plus hard max-depth; alert on depth-limit hits.
  • Unbounded fan-out → timeout/OOM. Cap per-node expansion, paginate wide nodes.
  • Orphaned edges. No FK on polymorphic relations; scheduled integrity job plus application-layer cascade.
  • Duplicate edges. Missing unique composite index means concurrent writes create parallel edges and silently corrupt counts.
  • Stale cached adjacency. TTL plus explicit invalidation on edge write.

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.

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.
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log