Skip to content

Commit

Permalink
Merge pull request #1723 from deguif/fix-elastica-deprecations
Browse files Browse the repository at this point in the history
Fix ruflin/elastica deprecations for index creation
  • Loading branch information
XWB authored Oct 26, 2020
2 parents ded9696 + 603c322 commit 2de1c0a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ in 6.0 versions.
* **[BC break]** Marked the `fos_elastica.client_prototype` service as private.
* **[BC break]** Marked the `fos_elastica.index_template_prototype` service as private.
* Added `auth_type` client parameter [Elastica#1790](https://github.com/ruflin/Elastica/pull/1790).
* Fixed deprecations for `Elastica\Index::create()` [Elastica#1828](https://github.com/ruflin/Elastica/pull/1828).

### 6.0.0-BETA3 (2020-09-28)

Expand Down
2 changes: 1 addition & 1 deletion src/Command/CreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->aliasProcessor->setRootName($indexConfig, $index);
}
$mapping = $this->mappingBuilder->buildIndexMapping($indexConfig);
$index->create($mapping, false);
$index->create($mapping);

if ($indexConfig->isUseAlias()) {
$index->addAlias($indexName);
Expand Down
2 changes: 1 addition & 1 deletion src/Index/Resetter.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function resetIndex(string $indexName, bool $populating = false, bool $fo
$this->dispatcher->dispatch($event = new PreIndexResetEvent($indexName, $populating, $force));

$mapping = $this->mappingBuilder->buildIndexMapping($indexConfig);
$index->create($mapping, true);
$index->create($mapping, ['recreate' => true]);

if (!$populating and $indexConfig->isUseAlias()) {
$this->aliasProcessor->switchIndexAlias($indexConfig, $index, $force);
Expand Down

0 comments on commit 2de1c0a

Please sign in to comment.