comphp / database
Driver-based database connection and query support for PHP applications.
Requires
- php: ^8.5
- comphp/config: ^0.3
- comphp/runtime: ^0.3.1
- psr/log: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- phpunit/phpunit: ^13.1
This package is auto-updated.
Last update: 2026-05-18 12:01:51 UTC
README
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.
Requirements
- PHP
^8.5 comphp/runtime:^0.3
Installation
Once this package is available through your Composer repositories, install it with:
composer require comphp/database
Usage
<?php // TODO: Write usage
Package Notes
This 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.
Error Handling
Connection failures, query failures, transaction failures, invalid connection names, and driver errors should throw CommonPHP database exceptions.
Documentation
License
MIT. See LICENSE.md.