PHPackages                             conserto/pomm-foundation - 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. [Framework](/categories/framework)
4. /
5. conserto/pomm-foundation

ActiveLibrary[Framework](/categories/framework)

conserto/pomm-foundation
========================

Pomm connection manager for Postgresql

4.0.5(1mo ago)418.5k↓57.6%[1 PRs](https://github.com/Conserto/pomm-foundation/pulls)3MITPHPPHP &gt;=8.4CI passing

Since Dec 15Pushed 1mo agoCompare

[ Source](https://github.com/Conserto/pomm-foundation)[ Packagist](https://packagist.org/packages/conserto/pomm-foundation)[ Docs](https://github.com/Conserto/pomm-foundation)[ RSS](/packages/conserto-pomm-foundation/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (13)Versions (44)Used By (3)

Foundation (Conserto fork)
==========================

[](#foundation-conserto-fork)

[![Latest Stable Version](https://camo.githubusercontent.com/239282d6b7c6a3677180d8e03d6ede26356b451f615b387e9bb5d2494f44cdf6/68747470733a2f2f706f7365722e707567782e6f72672f636f6e736572746f2f706f6d6d2d666f756e646174696f6e2f762f737461626c65)](https://packagist.org/packages/conserto/pomm-foundation)[![CI Status](https://github.com/conserto/pomm-foundation/actions/workflows/ci.yml/badge.svg)](https://github.com/conserto/pomm-foundation/actions/workflows/ci.yml/badge.svg)[![Monthly Downloads](https://camo.githubusercontent.com/24ee3d24063d2c6743cbf9ced2dc5132e4b01726f28fc2da7886b52974b75ccd/68747470733a2f2f706f7365722e707567782e6f72672f636f6e736572746f2f706f6d6d2d666f756e646174696f6e2f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/conserto/pomm-foundation)[![License](https://camo.githubusercontent.com/7fc6e17aa8429c04ae3d3a342796e68394e61cd5b2bf671349bd997e9e639f1a/68747470733a2f2f706f7365722e707567782e6f72672f636f6e736572746f2f706f6d6d2d666f756e646174696f6e2f6c6963656e73652e737667)](https://packagist.org/packages/conserto/pomm-foundation)

> **This is a maintained fork** of [pomm-project/foundation](https://github.com/pomm-project/foundation) by Grégoire HUBERT. Conserto maintains this fork to keep the library working on modern PHP versions, ship bug fixes, and extend the converter stack. Issues and pull requests should be filed against **this** repository.

Differences from upstream
-------------------------

[](#differences-from-upstream)

- PHP 8.4+ required (upstream targeted PHP 8.1).
- Rector-driven modernization of type declarations and PHP 8.x syntax.
- Extra converters and enum compatibility: `PgBackedEnum`, enum-aware `PgString` / `PgInteger` / `PgFloat`.
- Active CI on PHP 8.4 and 8.5.
- See [CHANGELOG](CHANGELOG) for the detailed release history.

What is Foundation ?
--------------------

[](#what-is-foundation-)

Foundation is the main block of Pomm database framework. It makes clients able to communicate either with the database or with each others through a session. One of these clients -- the query manager -- can make Foundation to be used as DBAL replacement. If you are looking for a library to use PostgreSQL in your web development, you might want to look at [Pomm’s model manager](https://github.com/pomm-project/ModelManager). If you want to create a custom database access layer or just perform SQL queries, Foundation is the right tool.

Foundation provides out of the box:

- Converters (all built-in Postgresql types are supported + arrays, HStore etc.) see [this SO comment](http://stackoverflow.com/questions/31643297/pg-query-result-contains-strings-instead-of-integer-numeric/31740990#31740990).
- Prepared Queries.
- Parametrized queries.
- Seekable iterators on results.
- LISTEN / NOTIFY asynchronous messages support.
- Service manager for easy integration with dependency injection containers.

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

[](#requirements)

- PHP &gt;= 8.4
    - ext-pgsql (not PDO)
- PostgreSQL (tested on recent versions; older ones may work but are not covered by CI)

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

[](#installation)

This fork is distributed on Packagist as [`conserto/pomm-foundation`](https://packagist.org/packages/conserto/pomm-foundation). Add it with Composer:

```
composer require conserto/pomm-foundation
```

**Note:** It is important the PHP configuration file defines the correct [timezone](http://php.net/manual/en/datetime.configuration.php) setting. Pomm also sets the PostgreSQL connection to this timezone to prevent time shifts between the application and the database.

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

[](#documentation)

Foundation’s documentation is available [either online](https://github.com/conserto/pomm-foundation/blob/main/documentation/foundation.rst) or directly in the `documentation` folder of the project.

Tests
-----

[](#tests)

This package uses [Atoum](https://github.com/atoum/atoum) as unit test framework. The tests are located in `sources/tests`. The test suite needs to access the database to ensure that read and write operations are made in a consistent manner. You need to set up a database for that and fill the `sources/tests/config.php` file with the according DSN. For convenience, Foundation provides two classes that extend `Atoum` with a `Session`:

- `PommProject\Foundation\Tester\VanillaSessionAtoum`
- `PommProject\Foundation\Tester\FoundationSessionAtoum`

Making your test class to extend one of these will grant them with a `buildSession` method that returns a newly created session. Clients of these classes must implement a `initializeSession(Session $session)` method (even a blank one). It is often a good idea to provide a fixture class as a session client, this method is the right place to register it.

Known bugs
----------

[](#known-bugs)

Unfortunately there is a bug we can not fix easily or without degrading performances of the whole stack:

- The `ConvertedResultIterator` can not recognize custom composite types when they are defined in schemas other than `public`. This is because the `pg_type` function does not return the schema the type belongs to. There are not turns around unless the schema is inspected manually by issuing a lot of queries. (see #53)

License
-------

[](#license)

Foundation is released under the MIT license — see [LICENSE](LICENSE). Original copyright © 2014 Grégoire HUBERT, fork maintenance © 2022-present Conserto.

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance88

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity93

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 84.5% 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 ~143 days

Recently: every ~0 days

Total

30

Last Release

59d ago

Major Versions

2.0.x-dev → 3.0.02022-06-30

3.2.4 → 4.0.02024-12-17

4.0.5 → 5.0.x-dev2026-05-05

PHP version history (3 changes)2.0-beta-1PHP &gt;=5.4.4

3.0.0PHP &gt;=8.1

4.0.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/09b111aacc97d5aa965e0067355541e8f85a39a47ad9445c147a45b51b67ddbc?d=identicon)[Conserto-contributor](/maintainers/Conserto-contributor)

---

Top Contributors

[![chanmix51](https://avatars.githubusercontent.com/u/81580?v=4)](https://github.com/chanmix51 "chanmix51 (382 commits)")[![neufman](https://avatars.githubusercontent.com/u/7502193?v=4)](https://github.com/neufman "neufman (18 commits)")[![ronanguilloux](https://avatars.githubusercontent.com/u/313677?v=4)](https://github.com/ronanguilloux "ronanguilloux (14 commits)")[![maximechagnolleau](https://avatars.githubusercontent.com/u/6151180?v=4)](https://github.com/maximechagnolleau "maximechagnolleau (12 commits)")[![sanpii](https://avatars.githubusercontent.com/u/113045?v=4)](https://github.com/sanpii "sanpii (10 commits)")[![stood](https://avatars.githubusercontent.com/u/327248?v=4)](https://github.com/stood "stood (5 commits)")[![t0k4rt](https://avatars.githubusercontent.com/u/498106?v=4)](https://github.com/t0k4rt "t0k4rt (3 commits)")[![dougetovski](https://avatars.githubusercontent.com/u/12248685?v=4)](https://github.com/dougetovski "dougetovski (3 commits)")[![nspyke](https://avatars.githubusercontent.com/u/901747?v=4)](https://github.com/nspyke "nspyke (1 commits)")[![artjomsimon](https://avatars.githubusercontent.com/u/2609170?v=4)](https://github.com/artjomsimon "artjomsimon (1 commits)")[![adrienbrault](https://avatars.githubusercontent.com/u/611271?v=4)](https://github.com/adrienbrault "adrienbrault (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")[![SebLours](https://avatars.githubusercontent.com/u/5138394?v=4)](https://github.com/SebLours "SebLours (1 commits)")

---

Tags

frameworkdatabasepostgresqlpomm

###  Code Quality

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/conserto-pomm-foundation/health.svg)

```
[![Health](https://phpackages.com/badges/conserto-pomm-foundation/health.svg)](https://phpackages.com/packages/conserto-pomm-foundation)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[cakephp/cakephp

The CakePHP framework

8.9k19.5M1.8k](/packages/cakephp-cakephp)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[pomm-project/foundation

Pomm connection manager for Postgresql

69438.4k9](/packages/pomm-project-foundation)

PHPackages © 2026

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