From 3e13fc6af6fc7d543db3cf903a2bc225aca645e6 Mon Sep 17 00:00:00 2001 From: Jacob Tobiasz Date: Wed, 20 Dec 2023 20:33:48 +0100 Subject: [PATCH] [Autocomplete] Update the setOptions method's signature --- src/Autocomplete/src/EntityAutocompleterInterface.php | 2 +- src/Autocomplete/src/Form/WrappedEntityTypeAutocompleter.php | 4 +--- .../Fixtures/Autocompleter/CustomProductAutocompleter.php | 5 +++++ 3 files changed, 7 insertions(+), 4 deletions(-) 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 + } }