laminas/laminas-db
Database abstraction and SQL builder for PHP. Provides adapters, connection management, query/statement execution, metadata and schema tools, result sets, and a fluent API for composing SQL across multiple database platforms.
TableDataGateway, RowDataGateway).Select, Insert, Update).Adopt if:
Look elsewhere if:
TableGateway patterns).*"Laminas\Db is a battle-tested database abstraction layer that lets us write database-agnostic PHP code, reducing vendor lock-in and future-proofing our stack. By adopting this, we can:
TableGateway) instead of raw SQL.*"This package provides a mature, PHP 8.5-compatible alternative to raw PDO or Eloquent for teams needing:
Select, Insert, Update builders.ResultSet objects easily for unit tests.TableDataGateway.
Key risks:TableGateway patterns (but docs are solid).
Recommendation: Pilot in a non-critical module (e.g., reporting) before full adoption. Pair with Doctrine Migrations for schema changes."*How can I help you explore Laravel packages today?