PHPackages                             makinacorpus/query-builder-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. makinacorpus/query-builder-bundle

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

makinacorpus/query-builder-bundle
=================================

Symfony integration for makinacorpus/query-builder

1.0.0(2y ago)017MITPHPPHP &gt;=8.1

Since Nov 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/makinacorpus/query-builder-bundle)[ Packagist](https://packagist.org/packages/makinacorpus/query-builder-bundle)[ RSS](/packages/makinacorpus-query-builder-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (14)Versions (6)Used By (0)

Query Builder Bundle
====================

[](#query-builder-bundle)

Integrates `makinacorpus/query-builder` into Symfony.

Setup
=====

[](#setup)

First install:

```
composer require makinacorpus/query-builder-bundle
```

Then add the bundle to `config/bundles.php` if `symfony/flex` did not:

```
return [
    // ... your other bundles.
    MakinaCorpus\QueryBuilderBundle\QueryBuilderBundle::class => ['all' => true],
];
```

And you're done.

Services
========

[](#services)

Each Doctrine connection will have both `MakinaCorpus\QueryBuilder\QueryBuilder`and `MakinaCorpus\QueryBuilder\DatabaseSession` associated service in container.

They are identifier by the `query_builder.session.CONNECTION_NAME` service identifier. You can manually inject by using the service name, or use autowiring.

You can target a Doctrine connection by injecting a `QueryBuilder` or `DatabaseSession` typed service by setting the parameter name to the Doctrine connection name, for example:

```
