PHPackages                             phpsoftbox/database - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. phpsoftbox/database

ActiveLibrary[Database &amp; ORM](/categories/database)

phpsoftbox/database
===================

DBAL component for the PhpSoftBox framework

0212↓84.5%PHP

Since Jun 22Pushed 1mo agoCompare

[ Source](https://github.com/phpsoftbox/database)[ Packagist](https://packagist.org/packages/phpsoftbox/database)[ RSS](/packages/phpsoftbox-database/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

PhpSoftBox Database (DBAL)
==========================

[](#phpsoftbox-database-dbal)

DBAL-компонент для PhpSoftBox: единый слой работы с базой данных поверх PDO, рассчитанный как на использование без DI, так и через DI-контейнер.

Быстрый старт
-------------

[](#быстрый-старт)

```
use PhpSoftBox\Database\Configurator\DatabaseFactory;

$config = [
    'connections' => [
        'default' => 'main',
        'main' => [
            'dsn' => 'sqlite:///:memory:',
        ],
    ],
];

$factory = new DatabaseFactory($config);
$conn = $factory->create();

$conn->execute('CREATE TABLE ' . $conn->table('users') . ' (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL)');
$conn->execute('INSERT INTO ' . $conn->table('users') . ' (name) VALUES (:name)', ['name' => 'Alice']);
```

Документация
------------

[](#документация)

- `docs/01-configuration.md` — DSN, connections, правила default connection.
- `docs/02-usage.md` — базовое использование, DI, read/write, recipes.
- `docs/03-migrations.md` — миграции и CLI.
- `docs/04-schema.md` — schema introspection.
- `docs/05-query-builder.md` — `CompiledQuery`, compile vs execute, агрегации, пагинация, настройка paginator.
- `docs/06-validator-adapter.md` — адаптер exists/unique.
- `docs/07-schema-builder.md` — SchemaBuilder, создание/изменение таблиц, внешние ключи.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance61

Regular maintenance activity

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0279d150240c97d210034878b0467462246dc14d29b5618157ff6a8be49a50e3?d=identicon)[inspector-who](/maintainers/inspector-who)

---

Top Contributors

[![inspector-who](https://avatars.githubusercontent.com/u/6973963?v=4)](https://github.com/inspector-who "inspector-who (1 commits)")

### Embed Badge

![Health badge](/badges/phpsoftbox-database/health.svg)

```
[![Health](https://phpackages.com/badges/phpsoftbox-database/health.svg)](https://phpackages.com/packages/phpsoftbox-database)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M118](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198741.5k12](/packages/pgvector-pgvector)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
