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.
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.
40001, or an unbounded immediate retry loop?SELECT ... FOR UPDATE?LISTEN/NOTIFY, no advisory locks, no stored procedures)?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.
pgsql. Point config/database.php at the CRDB cluster using the standard Postgres driver. Measure. Most teams stop here.40001 serialization errors are a measurable production issue and application-level retry is insufficient. This is the gate — do not skip it.DB::extend() or a custom connector; keep the configuration surface minimal.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.
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.
information_schema; schema drift goes undetected.pg_stat_activity equivalents.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.
How can I help you explore Laravel packages today?