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

Doctrine Cockroachdb Bundle Laravel Package

fwolfsjaeger/doctrine-cockroachdb-bundle

Symfony bundle that adds CockroachDB support to Doctrine, providing DBAL configuration, platform integration, and service wiring so your Symfony app can use CockroachDB as a Doctrine-managed database.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — poor for Laravel, by construction. This is a Symfony bundle. Its entire contribution is DI wiring: a bundle class that registers a Doctrine DBAL driver and a connection factory with Symfony's container, plus configuration tree entries. Laravel has no bundle loading mechanism — it uses service providers and config/database.php driver resolution. Nothing in this package executes in a Laravel request lifecycle. The framing of "Laravel/PHP package" does not match the artifact; the reusable asset is the driver class and its retry behavior, not the package itself.

What actually has value. CockroachDB speaks the PostgreSQL wire protocol, so a stock pdo_pgsql connection works for the overwhelming majority of workloads. The marginal value of a dedicated driver is almost entirely in transaction-retry semantics: CRDB runs SERIALIZABLE isolation only and surfaces contention as SQLSTATE 40001, which naive Postgres drivers do not retry. A TPM should treat the driver's retry loop, backoff strategy, and savepoint handling as the sole technical reason to look at this repo.

Integration feasibility. Only meaningful if the Laravel application already runs Doctrine DBAL/ORM (e.g., via laravel-doctrine/orm). In that narrow case you would copy the driver class into app/Support/Database/ or an internal package and register it from a service provider — the bundle wrapper is dead weight. For a standard Eloquent-only Laravel app, integration means writing an Illuminate\Database\Connectors\Connector subclass and a config/database.php entry, at which point you have reimplemented the package in a different framework's idiom.

Technical risk. High relative to the payoff. Two stars, zero dependents, single maintainer, no ecosystem validation, and a release cadence with no history to extrapolate. Bus factor is one. Doctrine DBAL 4.x reworked driver/middleware APIs; a niche driver without dependents has no pressure to track that. The dominant risk, however, is not package quality — it is that the fallback (pgsql driver) is well-trodden and this package is not, so any adoption is voluntary complexity.

Key questions before any commitment.

  1. Does the underlying driver implement bounded retry with exponential backoff and jitter on 40001, or an unbounded immediate retry loop?
  2. Is it DBAL 4 compatible, or pinned to 3.x?
  3. Does it correctly handle retries inside savepoints and under SELECT ... FOR UPDATE?
  4. Is the driver core in this repo or a dependency — and who maintains that?
  5. Does it do anything beyond aliasing the Postgres driver, e.g., CRDB-aware schema introspection (no triggers, no LISTEN/NOTIFY, no advisory locks, no stored procedures)?
  6. What is the actual failure evidence from the maintainer's own usage — is this in production anywhere?

Integration Approach

Stack fit. Laravel 10/11/12, PHP 8.2+, pdo_pgsql extension, Doctrine DBAL 3.x or 4.x. The Symfony bundle type is inert here; evaluate the driver as source, not as a dependency.

Migration path — staged, cheapest-first.

  1. Spike with stock pgsql. Point config/database.php at the CRDB cluster using the standard Postgres driver. Measure. Most teams stop here.
  2. Characterize retry pain. Only proceed if 40001 serialization errors are a measurable production issue and application-level retry is insufficient. This is the gate — do not skip it.
  3. Vendor the driver. Fork the driver class into the repo under an internal namespace, with the upstream commit SHA recorded. You now own it and can patch it.
  4. Wrap in a Laravel service provider. Register the driver with DB::extend() or a custom connector; keep the configuration surface minimal.
  5. Instrument. Emit metrics on retry attempts, retry exhaustion, and added latency per transaction.

Compatibility notes. CRDB diverges from Postgres in ways that bite migrations and introspection, not just queries: no advisory locks, no LISTEN/NOTIFY, no stored procedures, restricted trigger support, and schema-change restrictions around column type changes. Laravel's schema builder and any Doctrine-based introspection will hit these. Verify against your migration suite before, not after, the driver decision.

Sequencing. Treat the driver as the last 10% of a CockroachDB adoption, not the first. Database selection, schema design under SERIALIZABLE, and retry strategy at the application layer all precede it.

Operational Impact

Maintenance. Assume you own it. A two-star, zero-dependent package is a vendored dependency in all but name; plan for periodic manual rebases against DBAL releases and budget roughly a day per DBAL major version. Do not add it to composer.json as an unpinned dependency.

Support. No vendor backing. Cockroach Labs supports the database, not this driver. Internal expertise is the support model.

Scaling. The driver is not the bottleneck — CRDB scales horizontally and connection handling is standard. The retry loop is the operational lever: unbounded or unjittered retries under contention produce retry storms that amplify the load that caused them. Cap retries, add jitter, and alert on exhaustion rate.

Failure modes to plan for.

  • Silent retry regression. A driver update that changes retry behavior surfaces as intermittent 500s under peak load, not in tests. Cover with a contention test.
  • DBAL major-version drift. Driver API removed upstream; app fails at container boot.
  • Introspection breakage. Migration tooling misreads CRDB's information_schema; schema drift goes undetected.
  • Pool exhaustion. Long retry chains hold connections; watch pg_stat_activity equivalents.
  • Maintainer abandonment. No notice, no CVE channel. Vendoring is the mitigation.

Ramp-up. The code is small; the domain is not. The team needs CockroachDB operational knowledge — SERIALIZABLE semantics, contention hotspots, leaseholder routing, clock skew — far more than PHP driver knowledge. Budget for CRDB training regardless of whether this package is adopted; a team that understands CRDB will likely conclude the stock pgsql driver plus application-level retry is sufficient.

TPM recommendation. Do not adopt as a dependency. Use it as a reference implementation for transaction-retry semantics if and only if a CRDB spike demonstrates 40001 handling is a real problem. Opportunity score of 15.39 with two stars reflects a genuinely thin niche, not an overlooked one.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums