diff --git a/src/Autocomplete/src/EntityAutocompleterInterface.php b/src/Autocomplete/src/EntityAutocompleterInterface.php index 31958f79943..5276c8c4e50 100644 --- a/src/Autocomplete/src/EntityAutocompleterInterface.php +++ b/src/Autocomplete/src/EntityAutocompleterInterface.php @@ -52,7 +52,7 @@ public function isGranted(Security $security): bool; /** * @param array $options */ - public function setOptions(array $options): self; + public function setOptions(array $options): void; /* * Return group_by option. diff --git a/src/Autocomplete/src/Form/WrappedEntityTypeAutocompleter.php b/src/Autocomplete/src/Form/WrappedEntityTypeAutocompleter.php index 72f5db3c386..9bebe245a57 100644 --- a/src/Autocomplete/src/Form/WrappedEntityTypeAutocompleter.php +++ b/src/Autocomplete/src/Form/WrappedEntityTypeAutocompleter.php @@ -170,10 +170,8 @@ private function getEntityMetadata(): EntityMetadata return $this->entityMetadata; } - public function setOptions(array $options): EntityAutocompleterInterface + public function setOptions(array $options): void { $this->options = $options; - - return $this; } } diff --git a/src/Autocomplete/tests/Fixtures/Autocompleter/CustomProductAutocompleter.php b/src/Autocomplete/tests/Fixtures/Autocompleter/CustomProductAutocompleter.php index 3ae0877a517..a5b0edb8084 100644 --- a/src/Autocomplete/tests/Fixtures/Autocompleter/CustomProductAutocompleter.php +++ b/src/Autocomplete/tests/Fixtures/Autocompleter/CustomProductAutocompleter.php @@ -63,4 +63,9 @@ public function getGroupBy(): mixed { return null; } + + public function setOptions(array $options): void + { + // left blank intentionally + } }