PHPackages                             pachno/b2db - 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. pachno/b2db

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

pachno/b2db
===========

B2DB is a lightweight ORM for modern PHP applications

v1.0.8(1y ago)11.1k3MPL-2.0PHPPHP ^7.4|^8.0|^8.1

Since May 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/pachno/b2db)[ Packagist](https://packagist.org/packages/pachno/b2db)[ RSS](/packages/pachno-b2db/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (9)Dependencies (1)Versions (10)Used By (0)

B2db PHP ORM
============

[](#b2db-php-orm)

B2db is a lightweight ORM and DBAL for modern PHP applications (7.4 or newer), that works MySQL, MariaDB, Postgres and Microsoft SQL server.

B2db uses a Data Mapper pattern implementing Active Records. Read more about the architecture in [b2db architecture](docs/architecture.md)

Getting started
===============

[](#getting-started)

Install composer
----------------

[](#install-composer)

B2db uses [composer](https://getcomposer.org) for dependency management, and should be installed and used via composer.

For more information about how to set up b2db, see [Installation and setup](docs/installation.md)

Documentation
-------------

[](#documentation)

Browse [the documentation](docs/README.md).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~160 days

Recently: every ~262 days

Total

9

Last Release

545d ago

PHP version history (3 changes)v1.0.0PHP &gt;=7.3.0

v1.0.1PHP &gt;=7.4.0

v1.0.4PHP ^7.4|^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/d94f8b760e2e6b3fa4aec89aa744a4823887d50d375b82587f2419e2e7de63d0?d=identicon)[zegenie](/maintainers/zegenie)

---

Top Contributors

[![zegenie](https://avatars.githubusercontent.com/u/205936?v=4)](https://github.com/zegenie "zegenie (15 commits)")

---

Tags

b2dbormphpdatabaseormmysqlpostgresmariadbdb

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pachno-b2db/health.svg)

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

###  Alternatives

[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58523.9M36](/packages/scienta-doctrine-json-functions)[longitude-one/doctrine-spatial

Doctrine multi-platform support for spatial types and functions, compliant with Doctrine 2.19, 3.1, and dev ones (3.2 and 4.0).

891.4M1](/packages/longitude-one-doctrine-spatial)[aura/sqlschema

Provides facilities to read table names and table columns from a database using PDO.

41234.1k4](/packages/aura-sqlschema)[chillerlan/php-database

An extensible database wrapper and query builder.

431.2k2](/packages/chillerlan-php-database)

PHPackages © 2026

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