PHPackages                             umanit-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. umanit-pomm/foundation

ActiveLibrary[Framework](/categories/framework)

umanit-pomm/foundation
======================

Pomm connection manager for Postgresql

2.1.0(3y ago)06.3k↓27.3%3MITPHPPHP &gt;=5.5.9

Since Dec 15Pushed 2y agoCompare

[ Source](https://github.com/Umanit-Pomm/Foundation)[ Packagist](https://packagist.org/packages/umanit-pomm/foundation)[ RSS](/packages/umanit-pomm-foundation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (18)Used By (3)

Foundation
==========

[](#foundation)

[![Latest Stable Version](https://camo.githubusercontent.com/2f831d0049d19ec087a38b16f543da7010e8fa2d2b30eee24b875b40b2b1d3b5/68747470733a2f2f706f7365722e707567782e6f72672f706f6d6d2d70726f6a6563742f666f756e646174696f6e2f762f737461626c65)](https://packagist.org/packages/pomm-project/foundation) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/a920c1316ebfe2aeb42e744a9ea21ea3353925d23b8166e0ac8baf6eb8999bd7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f706f6d6d2d70726f6a6563742f466f756e646174696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/pomm-project/Foundation/?branch=master) [![Build Status](https://camo.githubusercontent.com/cf2a80c7543b3fa61c2caab1682378d3701f605978a241807b031998925ed59c/68747470733a2f2f7472617669732d63692e6f72672f706f6d6d2d70726f6a6563742f466f756e646174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/pomm-project/Foundation) [![Monthly Downloads](https://camo.githubusercontent.com/db17b15ea2465015fbd4df98335f15e6f1e9b8857555cbb8eb2f1f4b257084a8/68747470733a2f2f706f7365722e707567782e6f72672f706f6d6d2d70726f6a6563742f666f756e646174696f6e2f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/pomm-project/foundation) [![License](https://camo.githubusercontent.com/f7a46699bbdb2a162389d8f0efe6c3e50c1ef2fc0baebd6056f49b6826e77db2/68747470733a2f2f706f7365722e707567782e6f72672f706f6d6d2d70726f6a6563742f666f756e646174696f6e2f6c6963656e73652e737667)](https://packagist.org/packages/pomm-project/foundation)

This is the **experimental branch** 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)

This branch is tested against the following configurations:

- PHP 5.6, 7.0, 7.1, 7.2, 7.3 and uses mod-pgsql only (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 `"pomm-project/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/pomm-project/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

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 86.1% 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 ~210 days

Recently: every ~193 days

Total

15

Last Release

1221d ago

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

2.1.x-devPHP &gt;=5.5.9

### Community

Maintainers

![](https://www.gravatar.com/avatar/27f13221fde4957c93a4ed7293a6460272d626e53df227e3aae4f35aa9289e69?d=identicon)[DjLeChuck](/maintainers/DjLeChuck)

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

![](https://www.gravatar.com/avatar/8b42188cdb5d776997ee5e465f8df950c0ef9847ad3e4589dda4a3c1f15b5dc7?d=identicon)[Nedeas](/maintainers/Nedeas)

---

Top Contributors

[![chanmix51](https://avatars.githubusercontent.com/u/81580?v=4)](https://github.com/chanmix51 "chanmix51 (426 commits)")[![sanpii](https://avatars.githubusercontent.com/u/113045?v=4)](https://github.com/sanpii "sanpii (20 commits)")[![ronanguilloux](https://avatars.githubusercontent.com/u/313677?v=4)](https://github.com/ronanguilloux "ronanguilloux (14 commits)")[![GregJArnold](https://avatars.githubusercontent.com/u/15351438?v=4)](https://github.com/GregJArnold "GregJArnold (9 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)")[![DjLeChuck](https://avatars.githubusercontent.com/u/696780?v=4)](https://github.com/DjLeChuck "DjLeChuck (2 commits)")[![arno09](https://avatars.githubusercontent.com/u/17024038?v=4)](https://github.com/arno09 "arno09 (2 commits)")[![SebLours](https://avatars.githubusercontent.com/u/5138394?v=4)](https://github.com/SebLours "SebLours (2 commits)")[![gnugat](https://avatars.githubusercontent.com/u/793185?v=4)](https://github.com/gnugat "gnugat (2 commits)")[![artjomsimon](https://avatars.githubusercontent.com/u/2609170?v=4)](https://github.com/artjomsimon "artjomsimon (2 commits)")[![Nedeas](https://avatars.githubusercontent.com/u/4601729?v=4)](https://github.com/Nedeas "Nedeas (2 commits)")[![lunika](https://avatars.githubusercontent.com/u/767834?v=4)](https://github.com/lunika "lunika (1 commits)")[![DoudDNC](https://avatars.githubusercontent.com/u/77980221?v=4)](https://github.com/DoudDNC "DoudDNC (1 commits)")[![jubianchi](https://avatars.githubusercontent.com/u/327237?v=4)](https://github.com/jubianchi "jubianchi (1 commits)")[![adrienbrault](https://avatars.githubusercontent.com/u/611271?v=4)](https://github.com/adrienbrault "adrienbrault (1 commits)")[![npanau](https://avatars.githubusercontent.com/u/458684?v=4)](https://github.com/npanau "npanau (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

frameworkdatabasepostgresqlpomm

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/umanit-pomm-foundation/health.svg)](https://phpackages.com/packages/umanit-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)
