PHPackages                             samson/autocomplete-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. samson/autocomplete-bundle

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

samson/autocomplete-bundle
==========================

Easily integrate the Select2 autocomplete widget into your Symfony application to search Doctrine entities

2.0.3(11y ago)98.1k5[6 issues](https://github.com/SamsonIT/AutocompleteBundle/issues)MITPHPPHP &gt;=5.3.0

Since Aug 22Pushed 8y ago14 watchersCompare

[ Source](https://github.com/SamsonIT/AutocompleteBundle)[ Packagist](https://packagist.org/packages/samson/autocomplete-bundle)[ Docs](https://github.com/SamsonIT/AutocompleteBundle)[ RSS](/packages/samson-autocomplete-bundle/feed)WikiDiscussions master Synced 1mo ago

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

README
======

[](#readme)

Checkout SamsonIT/ShowCase to see a working example of how to use this bundle.

How to install
--------------

[](#how-to-install)

Currently, you'll need to follow these steps to ensure the autocomplete will work:

- Enable this and the UnexpectedResponseBundle in your AppKernel

Example:

- Make sure the latest JQuery version is loaded (JQuery UI is not necessary)
- Make sure the latest Select2 javascript is loaded
- Make sure the latest Select2 css files are loaded and that the images bundled with it are in place
- Make sure the autocomplete.js file in this bundle is loaded
- Make sure the autocomplete.css file in this bundle is loaded (this one is not all that necessary)

An example of the above requirements can be found in

- Make sure the autocomplete.html.twig form theme is included into twig

Find an example here:

How to use
----------

[](#how-to-use)

Using the autocomplete is very simple. There are three required options to configure the Form type, and one recommended:

```
$form = $this->createForm('autocomplete', null, array(
  'class' => 'SomeEntityClass',
  'template' => 'Template to use to display the entity.html.twig',
  'search_fields' => array('list of fields to search in'),
  'query_builder' => function(EntityRepository $er) {
    return $er->createQueryBuilder('s');
  }
);
```

The template can be defined as follows:

```
{% if highlight %}
Found: {{ result.name|highlight }}
{% else %}
{{ result.name }}
{% endif %}
```

The `highlight` filter will simply do nothing if the `highlight`property is false, so this is also a valid template:

```
{{ result.name|highlight }}
```

Upgrade
-------

[](#upgrade)

See [Upgrade.md](Upgrade.md)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~47 days

Recently: every ~69 days

Total

8

Last Release

4113d ago

Major Versions

1.1.1 → 2.0.02014-05-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/f0031d3ec8ff8b09844a9e31ee1569f4430c7972983fdf06839abd35764b3e51?d=identicon)[SamsonIT](/maintainers/SamsonIT)

---

Top Contributors

[![Burgov](https://avatars.githubusercontent.com/u/417674?v=4)](https://github.com/Burgov "Burgov (12 commits)")[![SamsonIT-Jelle](https://avatars.githubusercontent.com/u/47599676?v=4)](https://github.com/SamsonIT-Jelle "SamsonIT-Jelle (3 commits)")[![uwej711](https://avatars.githubusercontent.com/u/648874?v=4)](https://github.com/uwej711 "uwej711 (2 commits)")[![knalblauw](https://avatars.githubusercontent.com/u/4919242?v=4)](https://github.com/knalblauw "knalblauw (1 commits)")[![SchizoDuckie](https://avatars.githubusercontent.com/u/111710?v=4)](https://github.com/SchizoDuckie "SchizoDuckie (1 commits)")[![wizart](https://avatars.githubusercontent.com/u/1645518?v=4)](https://github.com/wizart "wizart (1 commits)")

---

Tags

symfonyautocompleteormdoctrineselect2

### Embed Badge

![Health badge](/badges/samson-autocomplete-bundle/health.svg)

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

###  Alternatives

[sonata-project/doctrine-orm-admin-bundle

Integrate Doctrine ORM into the SonataAdminBundle

46117.7M155](/packages/sonata-project-doctrine-orm-admin-bundle)[goodwix/doctrine-json-odm

JSON Object-Document Mapping bundle for Symfony and Doctrine

2226.0k](/packages/goodwix-doctrine-json-odm)

PHPackages © 2026

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