PHPackages                             petkopara/multi-search-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. petkopara/multi-search-bundle

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

petkopara/multi-search-bundle
=============================

Symfony bundle for Multi Criteria Search for doctrine entities using Form or Service.

v1.0.0(9y ago)1666.4k↓69.3%5[7 issues](https://github.com/petkopara/PetkoparaMultiSearchBundle/issues)3MITPHPCI failing

Since Oct 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/petkopara/PetkoparaMultiSearchBundle)[ Packagist](https://packagist.org/packages/petkopara/multi-search-bundle)[ Docs](https://github.com/petkopara/PetkoparaMultiSearchBundle)[ RSS](/packages/petkopara-multi-search-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (3)

MultiSearchBundle
=================

[](#multisearchbundle)

This bundle provides basic service and form type for Multi Search in Doctrine.

[![Build Status](https://camo.githubusercontent.com/09b0c4fde9363fdeaed954e62f67736ce85528f9e673531634880afe3f276de6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7065746b6f706172612f5065746b6f706172614d756c746953656172636842756e646c652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/petkopara/PetkoparaMultiSearchBundle/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7c3ccfadbf278eea2633232b061349a2aae91941e850081b3a1b47145a37ed29/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7065746b6f706172612f5065746b6f706172614d756c746953656172636842756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/petkopara/PetkoparaMultiSearchBundle/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/9832a6414da6f0baf783ab6770f17b4f53a6b5a00ac1dcedb8d33a53c828cd4c/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f34363238373466382d323238642d346439632d393531652d6535633030316134316334362f6d696e692e706e67)](https://insight.sensiolabs.com/projects/462874f8-228d-4d9c-951e-e5c001a41c46)[![Latest Stable](https://camo.githubusercontent.com/e1664870a783f67a1e45b437538b006941792477919bb44ed171119144e4b4ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7065746b6f706172612f6d756c74692d7365617263682d62756e646c652e7376673f6d61784167653d323539323030303f7374796c653d666c61742d737175617265)](https://packagist.org/packages/petkopara/multi-search-bundle)[![Total Downloads](https://camo.githubusercontent.com/1cea9a576a10eda2df4da3ae03f21fbb03259513d1b072f83f1c7798d288ae7a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7065746b6f706172612f6d756c74692d7365617263682d62756e646c652e7376673f6d61784167653d323539323030303f7374796c653d666c61742d737175617265)](https://packagist.org/packages/petkopara/multi-search-bundle)

Description
-----------

[](#description)

Search in all of entity columns by given search term. In response returns `Doctrine\ORM\QueryBuilder` containing the multiple search criteria. The searched columns can be specified.

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

[](#installation)

### Using composer

[](#using-composer)

```
composer require petkopara/multi-search-bundle

```

Add it to the `AppKernel.php` class:

```
new Petkopara\MultiSearchBundle\PetkoparaMultiSearchBundle(),

```

\##Usage

### Service

[](#service)

You can directly use the service and to apply the multi search to any doctrine query builder.

```
public function indexAction(Request $request)
{
    $search = $request->get('search');
    $em = $this->getDoctrine()->getManager();

    $qb = $em->getRepository('AppBundle:Post')->createQueryBuilder('e');
    $qb = $this->get('petkopara_multi_search.builder')->searchEntity($qb, 'AppBundle:Post', $search);
   //$qb = $this->get('petkopara_multi_search.builder')->searchEntity($qb, 'AppBundle:Post', $search, array('name', 'content'), 'wildcard');

    ..
}

```

### Form

[](#form)

Create your form type and include the multiSearchType in the buildForm function:

```
use Petkopara\MultiSearchBundle\Form\Type\MultiSearchType;

public function buildForm(FormBuilderInterface $builder, array $options)
{
    $builder
            ->add('search', MultiSearchType::class, array(
                'class' => 'AppBundle:Post', //required
                'search_fields' => array( //optional, if it's empty it will search in the all entity columns
                    'name',
                    'content'
                 ),
                 'search_comparison_type' => 'wildcard' //optional, what type of comparison to applied ('wildcard','starts_with', 'ends_with', 'equals')

            ))
    ;
}

```

In the controller add call to the multi search service:

```
public function indexAction(Request $request)
{
    $search = $request->get('search');
    $em = $this->getDoctrine()->getManager();
    $queryBuilder = $em->getRepository('AppBundle:Post')->createQueryBuilder('e');
    $filterForm = $this->createForm('AppBundle\Form\PostFilterType');

    // Bind values from the request
    $filterForm->handleRequest($request);

    if ($filterForm->isValid()) {
        // Build the query from the given form object
        $queryBuilder = $this->get('petkopara_multi_search.builder')->searchForm($queryBuilder, $filterForm->get('search'));
    }

    ..
}

```

Render your form in the view

```
{{ form_rest(filterForm) }}

```

Available Options
-----------------

[](#available-options)

The provided type has 2 options:

- `search_fields` - array of the entity columns that will be added in the search. If it's not set then will search in all columns
- `search_comparison_type` - how to compare the search term.

    - `wildcard` - it's equivalent to the %search% like search.
    - `equals` - like operator without wildcards. Wildcards still can be used with `equals` if the search term contains \*.
    - `starts_with` - it's equivalent to the %search like search.
    - `ends_with` - it's equivalent to the search% like search.

These parameters can be applyed to the service as well as 4th and 5th parameter to `searchEntity()` method

Author
------

[](#author)

Petko Petkov -

License
-------

[](#license)

MultiSearchBundle is licensed under the MIT License.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance21

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 77.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

Unknown

Total

1

Last Release

3539d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2778679?v=4)[Petko Petkov](/maintainers/petkopara)[@petkopara](https://github.com/petkopara)

---

Top Contributors

[![petkopara](https://avatars.githubusercontent.com/u/2778679?v=4)](https://github.com/petkopara "petkopara (31 commits)")[![tacman](https://avatars.githubusercontent.com/u/619585?v=4)](https://github.com/tacman "tacman (9 commits)")

---

Tags

doctrineentity-columnsmulti-searchdoctrinequery buildersymfony3multi-search

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/petkopara-multi-search-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/petkopara-multi-search-bundle/health.svg)](https://phpackages.com/packages/petkopara-multi-search-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

9410.8k](/packages/ahmed-bhs-doctrine-doctor)[petkopara/crud-generator-bundle

Symfony3 bundle for CRUD generation with pagination, filtering, sorting, page size, bulk delete and bootstrap3 markup. This Generator supports Doctrine association mapping.

7258.2k](/packages/petkopara-crud-generator-bundle)

PHPackages © 2026

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