2017 © Pedro Peláez
 

symfony-bundle elastica-bundle

image

ops-talent/elastica-bundle

  • Wednesday, April 25, 2018
  • by Mojihito
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 16 Versions
  • 150 % Grown

The README.md

ElasticaBundle

Installation

Open a command console and in your project directory execute following command to download latest version of this bundle:, (*1)

1. Download the Bundle

$ composer require opstalent/elastica-bundle dev-master

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*2)

2. Enable the Bundle

After downloading, enable the bundle by adding the following lines in the app/AppKernel.php file of your project:, (*3)

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            // ...
            new Opstalent\ElasticaBundle\ElasticaBundle(),
        ];

        // ...
    }
}

3. Modify config of FOSElasticaBundle

To enable serializer for Elasticsearch requests add following to your app/config/config.yml:, (*4)

# app/config/config.yml

fos_elastica:
   serializer: 
       serializer: 'ops_elastica.serializer'

To enable transformer for Elasticsearch responses add following to your app/config/config.yml:, (*5)

# app/config/config.yml

parameters:
    fos_elastica.elastica_to_model_transformer.prototype.orm.class: Opstalent\ElasticaBundle\Transformer\ElasticaToModelTransformer

The Versions