sergeytsalkov/meekrodb
MeekroDB is a lightweight PHP MySQL library that makes database access simple and safe. It offers concise query helpers, named and positional placeholders for automatic SQL injection protection, easy inserts, updates, deletes, and result handling without heavy ORM overhead.
Architecture fit. MeekroDB is a standalone, statically configured MySQL client (DB::$user, DB::$host, DB::query()), not a Laravel component. Laravel's data layer is PDO-based and mediated by Illuminate\Database\DatabaseManager, which supplies connection resolution, read/write splitting, transaction context, DB::listen query events, Telescope integration, and RefreshDatabase test isolation. MeekroDB bypasses all of it. It is a second, parallel data access path — not an extension of the framework's. For a greenfield Laravel service this is a poor fit; for a bounded adapter around legacy code it is workable.
Integration feasibility. Technically trivial to install and configure: a Composer dependency plus a service provider that maps config('database.connections.mysql') onto MeekroDB's static properties. The real cost is not installation but the seams: a separate connection (roughly doubling connection count under load), an independent transaction scope, a different exception type (MeekroDBException rather than Illuminate\Database\QueryException), and no participation in Laravel's query logging or event pipeline. All of these can be bridged with a thin adapter — none are free.
Technical risk.
DB::transaction. Mixing layers inside one unit of work produces partial-write failure modes that are hard to reproduce.MeekroDBException bypasses Laravel's exception handler configuration, so error reporting, Sentry grouping, and user-facing error responses need custom mapping.Key questions.
Stack fit. Position MeekroDB strictly as a bounded, read-mostly adapter, never as the primary data layer. New application code uses Eloquent/Query Builder; MeekroDB is confined to the legacy surface being migrated or to isolated reporting/ETL paths. Reject it outright as the data layer for a new Laravel service.
Migration path.
config('database.connections.mysql') so credentials are not duplicated.DB:: statics directly — this is the single most important step, because it is what makes later removal mechanical rather than archaeological.MeekroDBException to Illuminate\Database\QueryException so the framework handler, logging, and APM behave consistently.DB::listen-equivalent), restoring Telescope and slow-query visibility.Compatibility. PHP 8.x and MySQL 5.7/8.0 are fine. The mysqli extension must be present in every image — several base PHP images and managed hosts ship PDO-only. Laravel 10/11/12 coexist without conflict, but all test infrastructure that touches MeekroDB must run against real MySQL (e.g., containerized MySQL in CI) rather than SQLite. Note the hard constraint: never mix MeekroDB and Eloquent inside a single transaction — sequence work so each unit of work is single-layer.
Sequencing. Legal/spike first (one week, with a written go/no-go). Then adapter plus instrumentation plus CI MySQL before any production call site moves. Then migrate correctness-critical write paths (auth, payments, billing) to the framework layer first, since those are where split-transaction risk is unacceptable. Read-only reporting can stay on MeekroDB longest. Decommission is the final phase and should have a scheduled date, not an aspiration.
Maintenance. Effectively self-maintained. There is no cadence tied to Laravel or PHP release cycles, so compatibility work lands on the internal team. The static configuration model makes multi-connection and multi-tenant variants awkward to express and easy to misconfigure at runtime.
Support. Community-only; no commercial SLA, no vendor escalation path. Budget for an internal owner and a fork contingency. LGPL permits forking, but modifications must be published — plan the fork process before you need it, not after.
Scaling. The dominant cost is a second connection pool: expect connection counts to roughly double at the MySQL tier, which may force max_connections tuning or a proxy. MeekroDB lacks connection reuse semantics suited to Octane; static state persisting across requests is a correctness hazard if any per-request configuration is applied. Read/write splitting and sticky-connection behavior must be hand-built. Observability is the quieter scaling problem: without instrumentation there is no per-query latency data, so capacity planning degrades.
Failure modes.
Ramp-up. Low for application developers — the API is genuinely small and learnable in a day, and the named-parameter ergonomics are a real productivity win on legacy-style code. High for platform/SRE: custom instrumentation, dashboards, alerting, CI database provisioning, and a documented "do not use in new code" rule with lint or code-review enforcement. Net: cheap to adopt, expensive to operate cleanly, and only justified when it retires more legacy surface than it creates.
Recommendation. Approve conditionally, scoped to a legacy-migration bridge with a named owner, legal sign-off, CI MySQL, and a scheduled decommission date. Reject as the primary or greenfield data layer for a Laravel application.
How can I help you explore Laravel packages today?