Skip to content

Commit 92d82cf

Browse files
committed
[Autocomplete][Turbo] Remove BC layers for methods and parameters
1 parent 871f288 commit 92d82cf

File tree

5 files changed

+7
-18
lines changed

5 files changed

+7
-18
lines changed

src/Autocomplete/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Remove `ParentEntityAutocompleteType` in favor of `BaseEntityAutocompleteType`
88
- Remove `ExtraLazyChoiceLoader` in favor of `Symfony\Component\Form\ChoiceList\Loader\LazyChoiceLoader` from Symfony Form >=7.2
99
- Add parameter `$security` to `AutocompleteResultsExecutor::__construct()`
10+
- Remove BC layer for `EntityAutocompleterInterface::getAttributes()` and `EntityAutocompleterInterface::getGroupBy()`
1011

1112
## 2.30
1213

@@ -52,7 +53,7 @@ class IngredientAutocompleteType extends AbstractType
5253

5354
- Deprecate `ExtraLazyChoiceLoader` in favor of `Symfony\Component\Form\ChoiceList\Loader\LazyChoiceLoader`
5455
- Reset TomSelect when updating url attribute #1505
55-
- Add `getAttributes()` method to define additional attributes for autocomplete results #2541
56+
- Add `EntityAutocompleterInterface::getAttributes()` method to define additional attributes for autocomplete results #2541
5657

5758
## 2.22.0
5859

src/Autocomplete/src/EntityAutocompleterInterface.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@
1919
* Interface for classes that will have an "autocomplete" endpoint exposed.
2020
*
2121
* @template T of object
22-
*
23-
* TODO Remove next lines for Symfony UX 3
24-
*
25-
* @method array getAttributes(object $entity) Returns extra attributes to add to the autocomplete result.
26-
* @method mixed getGroupBy() Return group_by option.
2722
*/
2823
interface EntityAutocompleterInterface
2924
{
@@ -57,10 +52,8 @@ public function getValue(object $entity): mixed;
5752

5853
/**
5954
* Returns extra attributes to add to the autocomplete result.
60-
*
61-
* TODO Uncomment for Symfony UX 3
6255
*/
63-
/* public function getAttributes(object $entity): array; */
56+
public function getAttributes(object $entity): array;
6457

6558
/**
6659
* Return true if access should be granted to the autocomplete results for the current user.
@@ -71,8 +64,6 @@ public function isGranted(Security $security): bool;
7164

7265
/*
7366
* Return group_by option.
74-
*
75-
* TODO Uncomment for Symfony UX 3
7667
*/
77-
/* public function getGroupBy(): mixed; */
68+
public function getGroupBy(): mixed;
7869
}

src/Turbo/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Minimum required Symfony version is now 6.4
66
- Minimum required PHP version is now 8.2
77
- Remove old compatibility layer with deprecated `StimulusTwigExtension` from WebpackEncoreBundle ^1.0, use StimulusBundle instead
8+
- Remove BC layer for `TurboStreamListenRendererInterface::renderTurboStreamListen()` `$eventSourceOptions` parameter
89

910
## 2.30
1011

src/Turbo/src/Bridge/Mercure/TurboStreamListenRenderer.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,8 @@ public function __construct(
3434
) {
3535
}
3636

37-
public function renderTurboStreamListen(Environment $env, $topic /* array $eventSourceOptions = [] */): string
37+
public function renderTurboStreamListen(Environment $env, $topic, array $eventSourceOptions = []): string
3838
{
39-
if (\func_num_args() > 2) {
40-
$eventSourceOptions = func_get_arg(2);
41-
}
42-
4339
$topics = $topic instanceof TopicSet
4440
? array_map($this->resolveTopic(...), $topic->getTopics())
4541
: [$this->resolveTopic($topic)];

src/Turbo/src/Twig/TurboStreamListenRendererInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ interface TurboStreamListenRendererInterface
2323
/**
2424
* @param string|object $topic
2525
*/
26-
public function renderTurboStreamListen(Environment $env, $topic /* , array $eventSourceOptions = [] */): string;
26+
public function renderTurboStreamListen(Environment $env, $topic, array $eventSourceOptions = []): string;
2727
}

0 commit comments

Comments
 (0)