PHPackages                             ppokatilo/elastica-entity-mapping-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. [Search &amp; Filtering](/categories/search)
4. /
5. ppokatilo/elastica-entity-mapping-bundle

ActiveSymfony-bundle[Search &amp; Filtering](/categories/search)

ppokatilo/elastica-entity-mapping-bundle
========================================

Automatically updates elasticsearch mappings

v0.5.0(11y ago)117[1 issues](https://github.com/SHyx0rmZ/elastica-entity-mapping-bundle/issues)MITPHPPHP &gt;=5.5.0

Since Nov 21Pushed 11y ago1 watchersCompare

[ Source](https://github.com/SHyx0rmZ/elastica-entity-mapping-bundle)[ Packagist](https://packagist.org/packages/ppokatilo/elastica-entity-mapping-bundle)[ Docs](http://github/SHyx0rmZ/elastica-entity-mapping-bundle)[ RSS](/packages/ppokatilo-elastica-entity-mapping-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (8)Versions (14)Used By (0)

elastica-entity-mapping-bundle
==============================

[](#elastica-entity-mapping-bundle)

[![Latest Stable Version](https://camo.githubusercontent.com/3400c38f7d9030b0cf5adb3bc0ae15efdd0699ad70f6b87f9ebf2d328d95e7a6/687474703a2f2f706f7365722e73657276696365732e776974636865732e696f2f70706f6b6174696c6f2f656c6173746963612d656e746974792d6d617070696e672d62756e646c652f762f737461626c652e737667)](https://packagist.org/packages/ppokatilo/elastica-entity-mapping-bundle)[![Total Downloads](https://camo.githubusercontent.com/b607e834c42538f166ee495337197b7b552255c82a47ec17bf50a6f07b0f6633/687474703a2f2f706f7365722e73657276696365732e776974636865732e696f2f70706f6b6174696c6f2f656c6173746963612d656e746974792d6d617070696e672d62756e646c652f646f776e6c6f6164732e737667)](https://packagist.org/packages/ppokatilo/elastica-entity-mapping-bundle)[![Latest Unstable Version](https://camo.githubusercontent.com/361dbd22452f8d5fe523250fc2b451cb4bb36a0e4dcfa7927e8687cd52fe5995/687474703a2f2f706f7365722e73657276696365732e776974636865732e696f2f70706f6b6174696c6f2f656c6173746963612d656e746974792d6d617070696e672d62756e646c652f762f756e737461626c652e737667)](https://packagist.org/packages/ppokatilo/elastica-entity-mapping-bundle)[![License](https://camo.githubusercontent.com/f018e9e6d13747452c97f16683a3a0b0874b705b2cd1e78323c1de936012679c/687474703a2f2f706f7365722e73657276696365732e776974636865732e696f2f70706f6b6174696c6f2f656c6173746963612d656e746974792d6d617070696e672d62756e646c652f6c6963656e73652e737667)](https://packagist.org/packages/ppokatilo/elastica-entity-mapping-bundle)

An Symfony2 bundle that automatically updates your Elasticsearch mappings or notifies you of changes.

How it works
------------

[](#how-it-works)

An elastica client service is modified to be constructed using a factory. The factory reads Composer's autoload files to know about all your dependencies. It will then scan each directory for a subdirectory called `Entity` and search the PHP files in that subdirectory for the `@ElasticsearchMapping` annotation.

When instantiating the elastica client service, the factory will first check if the mapping of registered entities on disk differs from that in Elasticsearch. If so, it will either throw an exception or try to update the mapping automatically.

Example usage
-------------

[](#example-usage)

- app/AppKernel.php

    ```
    class AppKernel extends Kernel
    {
      public function registerBundles()
      {
          $bundles = array(
            // ...
          );

          if (in_array($this->getEnvironment(), array('dev', 'test'))) {
              $bundles[] = new SHyx0rmZ\ElasticaEntityMapping\ElasticaEntityMappingBundle();
          }

          return $bundles;
      }
    }

    // ...
    ```
- app/config/config\_dev.yml

    ```
    elastica_entity_mapping:
      clients:
        -
          service: elastica.client
          update: false # throw exceptions instead of updating mapping automatically
          indices:
            -
              name: %elastica_index_name%
              alias: dev
              settings: vendor/example/entitybundle/settings.json
            -
              name: my_other_index
              alias: other
    ```
- vendor/example/entitybundle/ExampleEntity.php

    ```
    /**
     * @ElasticsearchMapping(file="./example_entity.json", indices="dev,other")
     **/
    class ExampleEntity
    {
      // ...
    }
    ```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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 ~2 days

Total

12

Last Release

4212d ago

PHP version history (2 changes)v0.1.0PHP &gt;=5.3.2

v0.2.1PHP &gt;=5.5.0

### Community

Maintainers

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

---

Top Contributors

[![SHyx0rmZ](https://avatars.githubusercontent.com/u/654223?v=4)](https://github.com/SHyx0rmZ "SHyx0rmZ (37 commits)")

---

Tags

elasticsearchmapping

### Embed Badge

![Health badge](/badges/ppokatilo-elastica-entity-mapping-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ppokatilo-elastica-entity-mapping-bundle/health.svg)](https://phpackages.com/packages/ppokatilo-elastica-entity-mapping-bundle)
```

PHPackages © 2026

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