PHPackages                             gregosphatos/doctrine-filters-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. gregosphatos/doctrine-filters-bundle

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

gregosphatos/doctrine-filters-bundle
====================================

Some nice doctrine filters

1.0.2(10y ago)03.5kMITPHPPHP &gt;=5.3.0

Since Aug 27Pushed 10y ago1 watchersCompare

[ Source](https://github.com/GreGosPhaTos/DoctrineFiltersBundle)[ Packagist](https://packagist.org/packages/gregosphatos/doctrine-filters-bundle)[ RSS](/packages/gregosphatos-doctrine-filters-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (4)Used By (0)

Overview
========

[](#overview)

[![Build Status](https://camo.githubusercontent.com/3d8e02a6025203ad946fb51096844c6f3ec0ac0ea08554e3c63d223a0faa24a7/68747470733a2f2f7472617669732d63692e6f72672f477265476f73506861546f732f446f637472696e6546696c7465727342756e646c652e737667)](https://travis-ci.org/GreGosPhaTos/DoctrineFiltersBundle)[![Latest Stable Version](https://camo.githubusercontent.com/a4910a1986a8fde9307aa4ed4e1ee7ec86dd8272f22e88d8ae14b95dfd77ee67/68747470733a2f2f706f7365722e707567782e6f72672f677265676f73706861746f732f646f637472696e652d66696c746572732d62756e646c652f76657273696f6e)](https://packagist.org/packages/gregosphatos/doctrine-filters-bundle) [![Total Downloads](https://camo.githubusercontent.com/04b993e67aff18a04df118ba8ca5e194e805201cc70d2c42d61c3ec54f090274/68747470733a2f2f706f7365722e707567782e6f72672f677265676f73706861746f732f646f637472696e652d66696c746572732d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/gregosphatos/doctrine-filters-bundle) [![Latest Unstable Version](https://camo.githubusercontent.com/5605853916a7ab3b0bbce090890ac0b97109af190022c1023285ea685c93655f/68747470733a2f2f706f7365722e707567782e6f72672f677265676f73706861746f732f646f637472696e652d66696c746572732d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/gregosphatos/doctrine-filters-bundle) [![License](https://camo.githubusercontent.com/9c916380fe668e9763a5079acd8000e2b12aa02705c7e2866331768302cabf49/68747470733a2f2f706f7365722e707567782e6f72672f677265676f73706861746f732f646f637472696e652d66696c746572732d62756e646c652f6c6963656e7365)](https://packagist.org/packages/gregosphatos/doctrine-filters-bundle)

DoctrineFiltersBundle provides integration for [DoctrineFilters](http://doctrine-orm.readthedocs.org/en/latest/reference/filters.html) for your Symfony2 Project.

Installation
============

[](#installation)

### With composer :

[](#with-composer-)

Install composer on Linux / Mac OS

```
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

```

To install composer on Windows download the installer from [getcomposer.org/download](https://getcomposer.org/download/), execute it and follow the instructions.

[Composer documentation](https://getcomposer.org/doc/)

Add this on your composer.json

```
"require": {
    "gregosphatos/doctrine-filters-bundle": "~1.0"
}
```

Documentation
=============

[](#documentation)

### Record state filter

[](#record-state-filter)

This filter is really usefull for all db recordset that need to be statued (active, inactive). Available for Doctrine ORM and Doctrine mongo ODM :

in your config.yml :

```
orm:
    entity_managers:
      # Your own entity manager collection
      some_em:
        filters:
          state_filter:
              class:   GreGosPhaTos\DoctrineFiltersBundle\Doctrine\Filter\ORM\RecordStateFilter
              enabled: true
```

or

```
doctrine_mongodb:
   document_managers:
    # Your own document manager collection
    some_dm:
      filters:
        state_filter:
          class: GreGosPhaTos\DoctrineFiltersBundle\Doctrine\Filter\ODM\RecordStateFilter
          enabled: true
```

Manually add the configurator in your service.yml :

```
services:
  # ORM
  acme.doctrine.orm.filter.configurator:
    class: GreGosPhaTos\DoctrineFiltersBundle\Doctrine\Filter\ORM\Configurator
    arguments:
      - "@doctrine.orm.entity_manager"
      - "@annotation_reader"
    tags:
      - { name: kernel.event_listener, event: kernel.request }
  # ODM
  acme.doctrine.odm.filter.configurator:
    class: GreGosPhaTos\DoctrineFiltersBundle\Doctrine\Filter\ODM\Configurator
    arguments:
      - "@doctrine_mongodb.odm.document_manager"
      - "@annotation_reader"
    tags:
      - { name: kernel.event_listener, event: kernel.request }
```

Change your entities or documents :

```
use GreGosPhaTos\DoctrineFiltersBundle\Doctrine\Annotation\RecordState;

/**
 * Entity.
 *
 * @RecordState(stateFieldName="state", activeValue="active")
 */
class MyEntity
{
    /**
     * Record state
     *  possible values : active, inactive
     */
    private $state;
}
```

Then all the queries will be filter to get only the active records.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

3

Last Release

3910d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/26bf0a267c39025fc5664d378cbed25420646197f9ed7ebed6f3ba656c57540a?d=identicon)[GreGosPhaTos](/maintainers/GreGosPhaTos)

---

Top Contributors

[![GreGosPhaTos](https://avatars.githubusercontent.com/u/3729979?v=4)](https://github.com/GreGosPhaTos "GreGosPhaTos (23 commits)")

---

Tags

Symfony2doctrine2filters

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/gregosphatos-doctrine-filters-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/gregosphatos-doctrine-filters-bundle/health.svg)](https://phpackages.com/packages/gregosphatos-doctrine-filters-bundle)
```

###  Alternatives

[ocramius/doctrine-batch-utils

A set of utilities to operate with Doctrine ORM's batch processing functionality

3331.6M6](/packages/ocramius-doctrine-batch-utils)[webonaute/doctrine-fixtures-generator-bundle

Generate Fixture from your existing data in your database. You can specify the Entity name and the IDs you want to import in your fixture.

67184.1k](/packages/webonaute-doctrine-fixtures-generator-bundle)[data-dog/audit-bundle

Audit bundle for symfony2 and doctrine orm, logs any database change

141901.7k1](/packages/data-dog-audit-bundle)[h4cc/alice-fixtures-bundle

Symfony2 Bundle for loading fixture data with the Alice library.

76314.2k7](/packages/h4cc-alice-fixtures-bundle)[levelab/doctrine-discriminator-bundle

Symfony-ready Doctrine DiscriminatorMap extension, which allows to move mapping from superclass to subclasses

1241.6k](/packages/levelab-doctrine-discriminator-bundle)[data-dog/pager-bundle

Paginator bundle for symfony2 and doctrine orm, allows customization with filters and sorters

11103.5k7](/packages/data-dog-pager-bundle)

PHPackages © 2026

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