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

ActiveLibrary[Framework](/categories/framework)

pomm-project/foundation
=======================

Pomm connection manager for Postgresql

2.0.5(5y ago)70435.8k↓23.2%34[11 issues](https://github.com/pomm-project/Foundation/issues)[3 PRs](https://github.com/pomm-project/Foundation/pulls)9MITPHPPHP &gt;=5.4.4

Since Dec 15Pushed 3y ago11 watchersCompare

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

READMEChangelog (3)Dependencies (2)Versions (16)Used By (9)

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). It is compatible with PHP version &gt;= 8.0.

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

44

—

FairBetter than 90% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity50

Moderate usage in the ecosystem

Community35

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 86.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 ~248 days

Recently: every ~364 days

Total

13

Last Release

1210d 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/ad548f45d6e5ef262a3fccb208a92f2e31d6e53b71e989ec49fb3c7fe03dd020?d=identicon)[chanmix51](/maintainers/chanmix51)

---

Top Contributors

[![chanmix51](https://avatars.githubusercontent.com/u/81580?v=4)](https://github.com/chanmix51 "chanmix51 (428 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)")[![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)")[![arno09](https://avatars.githubusercontent.com/u/17024038?v=4)](https://github.com/arno09 "arno09 (2 commits)")[![lunika](https://avatars.githubusercontent.com/u/767834?v=4)](https://github.com/lunika "lunika (1 commits)")[![bolbo](https://avatars.githubusercontent.com/u/5883089?v=4)](https://github.com/bolbo "bolbo (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)")[![Nedeas](https://avatars.githubusercontent.com/u/4601729?v=4)](https://github.com/Nedeas "Nedeas (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

databasephppommpostgrespostgresqlframeworkdatabasepostgresqlpomm

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k532.1M19.2k](/packages/laravel-framework)[symfony/symfony

The Symfony PHP framework

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

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[cakephp/database

Flexible and powerful Database abstraction library with a familiar PDO-like API

9825.7M45](/packages/cakephp-database)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)

PHPackages © 2026

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