PHPackages                             blackbonjour/doctrine-dbal-tablegateway - 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. blackbonjour/doctrine-dbal-tablegateway

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

blackbonjour/doctrine-dbal-tablegateway
=======================================

Foo Bar

0.4.0(12mo ago)213MITPHPPHP ^8.3

Since Apr 5Pushed 12mo ago1 watchersCompare

[ Source](https://github.com/BlackBonjour/doctrine-dbal-tablegateway)[ Packagist](https://packagist.org/packages/blackbonjour/doctrine-dbal-tablegateway)[ RSS](/packages/blackbonjour-doctrine-dbal-tablegateway/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (7)Versions (7)Used By (0)

doctrine-dbal-tablegateway
==========================

[](#doctrine-dbal-tablegateway)

> This is just my personal playground and therefore not intended for production use.

A PHP library that implements the TableGateway pattern for Doctrine DBAL, providing a simple and efficient way to interact with database tables.

Overview
--------

[](#overview)

This library offers a clean, object-oriented interface for database operations using the TableGateway pattern. It wraps Doctrine DBAL to provide:

- Simple CRUD operations (Create, Read, Update, Delete)
- Efficient bulk operations for better performance
- Type-safe parameter handling
- Flexible query building
- Support for transactions

The TableGateway pattern encapsulates the database access logic for a single table, making your code more maintainable and testable.

Requirements
------------

[](#requirements)

- PHP 8.3 or higher
- Doctrine DBAL

Installation
------------

[](#installation)

```
composer require blackbonjour/doctrine-dbal-tablegateway
```

Basic Example
-------------

[](#basic-example)

```
// Create a TableGateway for the "user" table
$userTable = new TableGateway($connection, 'user');

// Insert a record
$userTable->insert(['name' => 'john_doe', 'email' => 'john@example.com']);

// Select records
$users = $userTable->select('status = :status', ['status' => 'active'])->fetchAllAssociative();

// Update records
$userTable->update(['status' => 'inactive'], ['last_login < :date'], ['date' => '2023-01-01']);

// Delete records
$userTable->delete(['id' => 123]);
```

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

[](#documentation)

For detailed information on how to use this library, please see:

- [Usage Guide](docs/USAGE.md) — Comprehensive usage examples
- [Unit Tests](docs/UNIT-TESTS.md) — Running and understanding unit tests
- [Integration Tests](docs/INTEGRATION-TESTS.md) — Setting up and running integration tests

License
-------

[](#license)

This project is licensed under the MIT License — see the LICENSE file for details.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance50

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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 ~8 days

Total

6

Last Release

363d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/204c2f409bdf9d8041584a0f0c10480070d49814385df66a8fa895f6e64ae7c8?d=identicon)[BlackBonjour](/maintainers/BlackBonjour)

---

Top Contributors

[![BlackBonjour](https://avatars.githubusercontent.com/u/13346461?v=4)](https://github.com/BlackBonjour "BlackBonjour (31 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/blackbonjour-doctrine-dbal-tablegateway/health.svg)

```
[![Health](https://phpackages.com/badges/blackbonjour-doctrine-dbal-tablegateway/health.svg)](https://phpackages.com/packages/blackbonjour-doctrine-dbal-tablegateway)
```

###  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)[martin-georgiev/postgresql-for-doctrine

Extends Doctrine with native PostgreSQL support for arrays, JSONB, ranges, PostGIS geometries, text search, ltree, uuid, and 100+ PostgreSQL-specific functions.

4485.3M4](/packages/martin-georgiev-postgresql-for-doctrine)[damienharper/auditor-bundle

Integrate auditor library in your Symfony projects.

4542.8M](/packages/damienharper-auditor-bundle)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[overtrue/laravel-versionable

Make Laravel model versionable.

585308.0k5](/packages/overtrue-laravel-versionable)[worksome/foggy

Foggy is a tool for making database dumps with some data removed/changed.

26571.7k1](/packages/worksome-foggy)

PHPackages © 2026

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