Skip to content

[Autocomplete] Fix BC and trigger deprecation for EntityAutocompleterInterface #797

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

1ed
Copy link
Contributor

@1ed 1ed commented Apr 16, 2023

Q A
Bug fix? yes
New feature? -
Tickets Fix #793
License MIT

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching that 👍 - I'll get this merged shortly

@weaverryan
Copy link
Member

Thanks Gábor!

@weaverryan weaverryan merged commit f99cc2a into symfony:2.x Apr 18, 2023
@@ -71,7 +71,9 @@ public function fetchResults(EntityAutocompleterInterface $autocompleter, string

$results = [];

if (null === $groupBy = $autocompleter->getGroupBy()) {
if (!method_exists($autocompleter, 'getGroupBy')) {
trigger_deprecation('symfony/ux-autocomplete', '2.8', 'Not implementing the "EntityAutocompleterInterface::getGroupBy()" in "%s" is deprecated.', get_debug_type($autocompleter));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This deprecation is not needed, the @method annotation will already trigger a similar deprecation (which is done via Symfony's DebugClassLoader).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx - got it at #808

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Autocomplete] potential BC break in the upcoming 2.x release
3 participants