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.2(2mo ago)415.8k↓19.3%3MITPHPPHP &gt;=8.4CI passing

Since Dec 15Pushed 2mo agoCompare

[ Source](https://github.com/Conserto/pomm-foundation)[ Packagist](https://packagist.org/packages/conserto/pomm-foundation)[ Docs](http://www.pomm-project.org)[ RSS](/packages/conserto-pomm-foundation/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (35)Used By (3)

Foundation
==========

[](#foundation)

[![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 fork of the foundation component of [Pomm Project](http://www.pomm-project.org).

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.

[See more with code examples on this blog post](http://www.pomm-project.org/news/a-short-focus-on-pomm-s-foundation.html).

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

[](#requirements)

- PHP 8.1
    - mod-pgsql (not PDO)
- Postgresql 9.4

Pomm might work with older versions of PHP or Postgres but this is not tested and can be broken any time.

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

[](#installation)

Pomm components are available on [packagist](https://packagist.org/packages/pomm-project/) using [composer](https://packagist.org/). To install and use Pomm's foundation, add a require line to `"conserto/pomm-foundation"` in your `composer.json` file.

**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/master/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)

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance85

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity92

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 85.8% 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 ~163 days

Recently: every ~183 days

Total

26

Last Release

77d ago

Major Versions

2.0.x-dev → 3.0.02022-06-30

3.2.4 → 4.0.02024-12-17

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)")[![ronanguilloux](https://avatars.githubusercontent.com/u/313677?v=4)](https://github.com/ronanguilloux "ronanguilloux (14 commits)")[![neufman](https://avatars.githubusercontent.com/u/7502193?v=4)](https://github.com/neufman "neufman (13 commits)")[![sanpii](https://avatars.githubusercontent.com/u/113045?v=4)](https://github.com/sanpii "sanpii (10 commits)")[![maximechagnolleau](https://avatars.githubusercontent.com/u/6151180?v=4)](https://github.com/maximechagnolleau "maximechagnolleau (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

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

[pomm-project/foundation

Pomm connection manager for Postgresql

70430.8k9](/packages/pomm-project-foundation)[opulence/opulence

The Opulence PHP framework

72329.0k1](/packages/opulence-opulence)[fastsitephp/fastsitephp

A Modern Open Source Framework for building High Performance Websites and API’s with PHP

1292.7k1](/packages/fastsitephp-fastsitephp)

PHPackages © 2026

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