Skip to content

Commit

Permalink
Make mappings configuration unique to allow prepend of configuration (#…
Browse files Browse the repository at this point in the history
…882)

* Make mappings configuration unique to allow prepend  of configuration

* Fix travis ci by set distribution
  • Loading branch information
alexander-schranz authored Feb 5, 2020
1 parent e52332a commit 17a9d5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
sudo: false
dist: trusty
language: php

matrix:
Expand Down
8 changes: 7 additions & 1 deletion DependencyInjection/ONGRElasticsearchExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ public function load(array $configs, ContainerBuilder $container)
$config['profiler'] = isset($config['profiler']) ?
$config['profiler'] : $container->getParameter('kernel.debug');


$managers = $config['managers'];
foreach ($managers as &$manager) {
$manager['mappings'] = array_unique($manager['mappings']);
}

$container->setParameter('es.cache', $config['cache']);
$container->setParameter('es.analysis', $config['analysis']);
$container->setParameter('es.managers', $config['managers']);
$container->setParameter('es.managers', $managers);
$definition = new Definition(
'ONGR\ElasticsearchBundle\Service\ManagerFactory',
[
Expand Down

0 comments on commit 17a9d5a

Please sign in to comment.