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

ActiveSymfony-bundle[Framework](/categories/framework)

gnugat/pomm-foundation-bundle
=============================

A pomm-project/foundation integration in symfony

v0.7.0(4y ago)610.9k1MITPHPPHP ^8.0CI failing

Since Sep 23Pushed 4y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (10)Versions (13)Used By (0)

PommFoundation Bundle
=====================

[](#pommfoundation-bundle)

A [pomm-project/foundation](https://github.com/pomm-project/Foundation)integration in [Symfony](http://symfony.com/).

This bundle provides Console Commands for your database, as well as a Pomm's `QueryManagerInterface` service to be able to make SQL queries in your Symfony application.

The provided `QueryManagerInterface` implementation is tied to a Connection:

1. the first time it is called, opens a new connection
2. the next times it is called, uses the existing connection
3. if shutdown is called, closes the connection and goes back to step 1

This allows to keep a 1 to 1 relation between a HTTP request and a database Connection, which is important when the application is a long running process (e.g. tests, FastCGI, AMQP consumer, etc).

It also provides support parameter conversion for:

- booleans: from `false` to `'f'` and from `true` to `'t'`
- `\DateTime`: string formatted as `Y-m-d H:i:s T`

Integrations
------------

[](#integrations)

This bundle provides provides the following:

- the service `PommProject\Foundation\QueryManager\QueryManagerInterface`
- the event listener `Gnugat\PommFoundationBundle\EventListener\ClosingConnectionListener`
- the console commands:
    - `gnugat-pomm-foundation:database:check-existence` (`g:p:ch`)
    - `gnugat-pomm-foundation:database:close-connections` (`g:p:cl`)
    - `gnugat-pomm-foundation:database:create` (`g:p:cr`)
    - `gnugat-pomm-foundation:database:drop` (`g:p:dr`)
    - `gnugat-pomm-foundation:database:dump` (`g:p:du`)
    - `gnugat-pomm-foundation:database:execute-file` (`g:p:ex`)
    - `gnugat-pomm-foundation:database:launch-console` (`g:p:la`)
    - `gnugat-pomm-foundation:database:query` (`g:p:qu`)

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

[](#installation)

First provide the database configuration:

```
# config/parameters.yaml.dist
parameters:
    database_host: 127.0.0.1
    database_port: 5432
    database_name: gnugat_pomm_foundation
    database_user: postgres
    database_password: ~

```

Then install `gnugat/pomm-foundation-bundle` using [Composer](https://getcomposer.org/download/):

```
composer require gnugat/pomm-foundation-bundle:^0.6

```

Finally add the following in your `config/bundles.php`:

```
