Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Symfony 4.2 deprecation warning (not implementing the static getExtendedTypes() method) #300

Open
nmeirik opened this issue Dec 1, 2018 · 4 comments

Comments

@nmeirik
Copy link

nmeirik commented Dec 1, 2018

After upgrading to Symfony 4.2 the following deprecation warning is thrown which seems to be related to this bundle:

Not implementing the static getExtendedTypes() method in %lexik_form_filter.type_extension.filter_extension.class% when implementing the Symfony\Component\Form\FormTypeExtensionInterface is deprecated since Symfony 4.2. The method will be added to the interface in 5.0.

Additional information is available here.

@gilles-g
Copy link
Member

Hi,

If you want to contribute you can propose a PR ;)

But one day I will check that issue!

@spackmat
Copy link
Contributor

spackmat commented Mar 4, 2019

Just implementing a getExtendedTypes() method in Lexik\Bundle\FormFilterBundle\Filter\Form\FilterTypeExtension doesn't remove the deprecation warning, since the lexik_form_filter.type_extension.filter_extension service is still tagged with <tag name="form.type_extension" extended_type="Symfony\Component\Form\Extension\Core\Type\FormType" />. Removing this tag silences the deprecation warning, but will break the service in older symfony-versions I guess. I don't know how to deal with that, but when that can be solved, that would be all.

@spackmat
Copy link
Contributor

spackmat commented Mar 6, 2019

Sorry, removing the tag from the service definition doesn't work. I removes the deprecated message but afterwards the filter extension doesn't work anymore. So the service must be autoconfigured to work without the tag.

@antoniocambados
Copy link

I've been investigating this deprecation and it's closely tied to using parameters as the given class to the service definitions.

I've reported a bug here but I think using proper classes in the service definitions is the way to go, since the bundle is not really taking advantage of them (they're not being exposed in the bundle configuration, for instance).

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

No branches or pull requests

4 participants