laminas/laminas-db
Laminas\Db is a database abstraction layer for PHP, offering adapters, SQL construction, result sets, metadata, and TableGateway/RowGateway patterns. It supports PDO and driver-based connections for portable database code in Laminas apps.
Sql\Select → Query Builder, TableDataGateway → Eloquent model or repository, HydratingResultSet → API Resource / DTO hydration, Adapter → Laravel's DB connection. Every usage site is a work item; the count of TableGateway and Sql imports is a defensible proxy for migration scope.Consider it when:
Look elsewhere when:
To executives: This is a frozen, permissively licensed component inside our legacy PHP stack. The license is a non-issue; the maintenance model is the issue. It is feature-complete and receives security fixes only, so treat it as a stable asset to be contained, not expanded. The ask is not budget to adopt it — it is budget to exit it on a planned timeline, plus a small ongoing allowance for security patching in the interim. The headline risk is key-person and succession risk on an upstream project that is openly asking for a new maintainer, not an immediate outage risk.
To engineering: Do not standardize on this in new Laravel services — one query layer, one hydration model, one connection config. Where it already exists, do not refactor it opportunistically; instead put a repository interface in front of every TableGateway and Sql usage so the blast radius is bounded and the replacement is a swap. Route all database access through the adapter, never through platform-specific PDO handles (upstream itself flags that pattern as unsafe). Treat the dependency as security-patch-only: track advisories, pin versions, and do not plan features that require upstream changes. When you migrate a module to Laravel, migrate the data access with it — a half-migrated service running Eloquent and Laminas\Db against the same schema is the outcome we are explicitly trying to avoid.
How can I help you explore Laravel packages today?