Skip to content

Commit

Permalink
fix(metadata): no deprecation when elasticsearch is null (#5450)
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka authored Mar 12, 2023
1 parent 693fd44 commit 8a88e0c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function create(string $resourceClass): ResourceMetadataCollection
: 'You will have to remove it when upgrading to v4';
trigger_deprecation('api-platform/core', '3.1', sprintf('Setting "elasticsearch" in GraphQlOperation is deprecated. %s', $solution));
}
if ($this->hasIndices($graphQlOperation)) {
if (null !== $elasticsearch && $this->hasIndices($graphQlOperation)) {
$graphQlOperation = $graphQlOperation->withElasticsearch(true);
}

Expand Down

0 comments on commit 8a88e0c

Please sign in to comment.