PHPackages                             conserto/pomm-bundle - 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. conserto/pomm-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

conserto/pomm-bundle
====================

The Symfony bundle for Pomm

6.0.3(4mo ago)516.3k—2.2%MITPHPPHP &gt;=8.4

Since Oct 9Pushed 4mo agoCompare

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

READMEChangelog (10)Dependencies (11)Versions (41)Used By (0)

Pomm bundle for Symfony
=======================

[](#pomm-bundle-for-symfony)

[![Latest Stable Version](https://camo.githubusercontent.com/e036f598db5272e66c6486de83ae1abc786e7b832da194c61806e710017c2aa5/68747470733a2f2f706f7365722e707567782e6f72672f636f6e736572746f2f706f6d6d2d62756e646c652f762f737461626c65)](https://packagist.org/packages/conserto/pomm-bundle)[![CI Status](https://github.com/conserto/pomm-bundle/actions/workflows/ci.yml/badge.svg)](https://github.com/conserto/pomm-bundle/actions/workflows/ci.yml/badge.svg)[![Monthly Downloads](https://camo.githubusercontent.com/e5d5201f7f5d24ab4ae5ed29e260ebc5251cb8e5667f6746579819d3751a7433/68747470733a2f2f706f7365722e707567782e6f72672f636f6e736572746f2f706f6d6d2d62756e646c652f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/conserto/pomm-bundle)[![License](https://camo.githubusercontent.com/970faaa4f1a8ce37427d731d853e577f0383b024750aa0030c5105d65a14b73b/68747470733a2f2f706f7365722e707567782e6f72672f636f6e736572746f2f706f6d6d2d62756e646c652f6c6963656e73652e737667)](https://packagist.org/packages/conserto/pomm-bundle)

This is a fork of the Pomm bundle component for the Pomm database framework.

This bundle provides a `pomm` service to use the Pomm [Model Manager](https://github.com/conserto/pomm-model-manager) with Symfony.

**Note:**

If you are looking for a bundle for Pomm 2.x then look up for `pomm-project/pomm-bundle` on packagist. If you are looking for a bundle for Pomm 1.x then look up for `pomm/pomm-bundle` on packagist.

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

[](#installation)

```
composer require conserto/pomm-bundle

```

Configuration
-------------

[](#configuration)

In the `app/config` folder, store your db connection parameters in `parameters.yml`:

```
parameters:
    db_host1: 127.0.0.1
    db_port1: 5432
    db_name1: my_db_name
    db_user1: user
    db_password1: pass

    db_host2: 127.0.0.1
#   etc.
```

Sensitive information such as database credentials should not be committed in Git. To help you prevent committing those files and folders by accident, the Symfony Standard Distribution comes with a file called .gitignore which list resources that Git should ignore, included this `parameters.yml` file. You can now refer to these parameters elsewhere by surrounding them with percent (%).

Add an entry in `config.yml`:

```
pomm:
    configuration:
        my_db1:
            dsn: "pgsql://%db_user1%:%db_password1%@%db_host1%:%db_port1%/%db_name1%"
            pomm:default: true
        my_db2:
            dsn: "pgsql://%db_user2%:%db_password2%@%db_host2%:%db_port2%/%db_name2%"
            session_builder: "pomm.session_builder"
    logger:
        service: "@logger"
```

And in `routing_dev.yml`:

```
_pomm:
    resource: "@PommBundle/Resources/config/routing.yml"
    prefix:   /_pomm
```

Command line interface
----------------------

[](#command-line-interface)

The [Pomm CLI](https://github.com/conserto/pomm-cli) is available through the `bin/console` utility. It is possible to browse the database or to generate model files.

```
$ ./bin/console pomm:generate:relation-all -d src -a 'AppBundle\Model' my_db1 student

```

If you want generate schema, you need to use the model manager session builder:

```
pomm:
    configuration:
        my_db1:
            dsn: "pgsql://%db_user1%:%db_password1%@%db_host1%:%db_port1%/%db_name1%"
            session_builder: "pomm.model_manager.session_builder"
```

Using Pomm from the controller
------------------------------

[](#using-pomm-from-the-controller)

The Pomm service is available in the DIC as any other service:

```
    function myAction($name)
    {
        $students = $this->get('pomm')['my_db2']
            ->getModel('\AppBundle\Model\MyDb1\PublicSchema\StudentModel')
            ->findWhere('name = $*', [$name])
            ;

        …
```

It is now possible to tune and create a model layer as described in [the quick start guide](http://www.pomm-project.org/documentation/sandbox2).

Value resolver
--------------

[](#value-resolver)

This bundle provide a [value resolver](https://symfony.com/doc/current/controller/value_resolver.html)to convert request to a flexible entity. The resolver search in the request the parameters with names matching primary key.

You can specify witch connexion use in the attribute #\[Entity\]:

```
public function getAction(#[Entity('my_db2')] Student $student)
```

By default, the model used for find the entity is deduce by adding `Model` to entity class name. If you have a different class name, you can use the `modelClass`option:

```
public function getAction(#[Entity(modelClass: 'StudentModel')] Student $student)
```

This feature require [symfony/http-kernel](https://symfony.com/doc/current/components/http_kernel.html).

Serializer
----------

[](#serializer)

You can use the [serializer](https://symfony.com/doc/current/components/serializer.html)component to serialize entities.

Property info
-------------

[](#property-info)

This bundle also provide [property info](https://symfony.com/doc/current/components/property_info.html) support to retrieve flexible entity properties informations.

Poolers as service
------------------

[](#poolers-as-service)

If you need to add additional poolers into the session builder all you need to do is tag a service definition with `pomm.pooler`

Model and Model layer as a service
----------------------------------

[](#model-and-model-layer-as-a-service)

Model and model layer objects can be registered as a service. For this to work properly you have to tag your service correctly and remove `class:session_builder` from configuration.

Models must be tagged with `pomm.model` and layers with `pomm.model_layer`

Both of those tags have the following parameters:

- `pooler` which is the name of a default pooler service, if left blank the default is used
- `session` which is the name of a default session service this is used from, if left blank the default is used

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance74

Regular maintenance activity

Popularity31

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity93

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 63% 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 ~133 days

Recently: every ~92 days

Total

29

Last Release

147d ago

Major Versions

2.4.2 → 3.0.02020-10-18

3.0.0 → 4.0.02022-07-01

4.0.1 → 5.0.02023-02-02

5.1.2 → 6.0.02024-12-17

PHP version history (4 changes)2.0.0PHP &gt;=5.4.4

3.0.0PHP &gt;=7.1

4.0.0PHP &gt;=8.1

6.0.0PHP &gt;=8.4

### Community

Maintainers

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

---

Top Contributors

[![sanpii](https://avatars.githubusercontent.com/u/113045?v=4)](https://github.com/sanpii "sanpii (138 commits)")[![chanmix51](https://avatars.githubusercontent.com/u/81580?v=4)](https://github.com/chanmix51 "chanmix51 (27 commits)")[![stood](https://avatars.githubusercontent.com/u/327248?v=4)](https://github.com/stood "stood (13 commits)")[![neufman](https://avatars.githubusercontent.com/u/7502193?v=4)](https://github.com/neufman "neufman (12 commits)")[![maximechagnolleau](https://avatars.githubusercontent.com/u/6151180?v=4)](https://github.com/maximechagnolleau "maximechagnolleau (10 commits)")[![lusimeon](https://avatars.githubusercontent.com/u/5418329?v=4)](https://github.com/lusimeon "lusimeon (4 commits)")[![mvrhov](https://avatars.githubusercontent.com/u/450008?v=4)](https://github.com/mvrhov "mvrhov (3 commits)")[![dougetovski](https://avatars.githubusercontent.com/u/12248685?v=4)](https://github.com/dougetovski "dougetovski (3 commits)")[![lunika](https://avatars.githubusercontent.com/u/767834?v=4)](https://github.com/lunika "lunika (2 commits)")[![ronanguilloux](https://avatars.githubusercontent.com/u/313677?v=4)](https://github.com/ronanguilloux "ronanguilloux (2 commits)")[![cordoval](https://avatars.githubusercontent.com/u/328359?v=4)](https://github.com/cordoval "cordoval (1 commits)")[![ubermuda](https://avatars.githubusercontent.com/u/10758?v=4)](https://github.com/ubermuda "ubermuda (1 commits)")[![yann-eugone](https://avatars.githubusercontent.com/u/1303838?v=4)](https://github.com/yann-eugone "yann-eugone (1 commits)")[![GromNaN](https://avatars.githubusercontent.com/u/400034?v=4)](https://github.com/GromNaN "GromNaN (1 commits)")[![Nedeas](https://avatars.githubusercontent.com/u/4601729?v=4)](https://github.com/Nedeas "Nedeas (1 commits)")

---

Tags

symfonydatabaseormpostgresqlpomm

###  Code Quality

Static AnalysisPHPStan, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[pomm-project/pomm-bundle

The Symfony2 bundle for Pomm2

81198.7k4](/packages/pomm-project-pomm-bundle)[sonata-project/doctrine-orm-admin-bundle

Integrate Doctrine ORM into the SonataAdminBundle

46117.7M155](/packages/sonata-project-doctrine-orm-admin-bundle)[fresh/doctrine-enum-bundle

Provides support of ENUM type for Doctrine2 in Symfony applications.

4636.8M12](/packages/fresh-doctrine-enum-bundle)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[pomm-project/model-manager

PHP Object Model Manager for Postgresql

69281.6k6](/packages/pomm-project-model-manager)[pomm/pomm-bundle

The Symfony2 bundle for Postgresql Object Model Manager

3230.3k1](/packages/pomm-pomm-bundle)

PHPackages © 2026

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