Closed simplegr closed 3 years ago
See https://github.com/sonata-project/SonataAdminBundle/blob/3.x/src/Admin/BaseFieldDescription.php#L542
We should replace
sonata_admin.field_description.associationadmin.formfielddescriptions[field_name].help
By
sonata_admin.field_description.associationadmin.formfielddescriptions[field_name].getHelp('sonata_deprecation_mute')
Can you try it and provide a PR @simplegr ?
Environment
Sonata packages
Symfony packages
PHP version
Subject
In twig template edit_one_to_many_inline_table.html.twig the following line 55:
{% if sonata_admin.field_description.associationadmin.formfielddescriptions[field_name].help %}
calls
BaseFieldDescription::getHelp()
and produces deprecation message:User Deprecated: The "Sonata\AdminBundle\Admin\BaseFieldDescription::getHelp()" method is deprecated since sonata-project/admin-bundle 3.74 and will be removed in version 4.0. Use Symfony Form "help" option instead.
just for checking if help exists.
Minimal repository with the bug
Steps to reproduce
Expected results
Should not produce deprecation message if
sonata_admin.field_description.associationadmin.formfielddescriptions[field_name].help
is nullActual results