comphp/database

Driver-based database connection and query support for PHP applications.

Maintainers

Package info

github.com/commonphp/database

pkg:composer/comphp/database

Statistics

Installs: 3

Dependents: 4

Suggesters: 0

Stars: 0

Open Issues: 0

0.3 2026-05-18 11:59 UTC

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.