ops-talent / elastica-bundle
Installs: 450
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 2
Type:symfony-bundle
Requires
- php: ^7
- doctrine/annotations: ^1.4
- pagerfanta/pagerfanta: ^1.0
- symfony/config: ^3.2
- symfony/dependency-injection: ^3.2
- symfony/event-dispatcher: ^3.2
- symfony/http-kernel: ^3.2
- symfony/property-access: ^3.2
- symfony/serializer: ^3.2
This package is auto-updated.
Last update: 2024-10-18 14:38:23 UTC
README
Installation
Open a command console and in your project directory execute following command to download latest version of this bundle:
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. Enable the Bundle
After downloading, enable the bundle by adding the following lines in the app/AppKernel.php
file of your project:
<?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
:
# 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
:
# app/config/config.yml parameters: fos_elastica.elastica_to_model_transformer.prototype.orm.class: Opstalent\ElasticaBundle\Transformer\ElasticaToModelTransformer