CommonPHP Database provides driver-based database connection and query support for CommonPHP applications. It defines database managers, connection handling, result behavior, and the contracts needed for database-specific drivers such as MySQL or Microsoft SQL Server.
The package is intended to support named connections and lazy driver creation so applications can define multiple database connections without opening them until needed.
- PHP
^8.5 comphp/runtime:^0.3
Once this package is available through your Composer repositories, install it with:
composer require comphp/database<?php
// TODO: Write usageThis package should provide database managers, named connections, lazy connection drivers, transactions, and result abstractions. Concrete database engines such as MySQL, SQL Server, SQLite, and PostgreSQL should live in driver packages.
Connection failures, query failures, transaction failures, invalid connection names, and driver errors should throw CommonPHP database exceptions.
MIT. See LICENSE.md.