Description:
Bug when using setEntrytoStringMethod on a CollectionField.
In the Twig block collection_entry_row (form_theme.html.twig), when generating the prototype, the parameter value is NULL.
How to reproduce:
yield CollectionField::new('recipes')
->setEntryToStringMethod(fn():string => 'Test') //OK
->setEntryToStringMethod('getName') //Error
->setEntrytostringMethod(fn(Recipe $recipe):string => $recipe->getName().' test') // Error
Solution:
In the method representAsString (EasyAdminTwigExtension.php) the test on a NULL value should be at the beginning of the method.
Description:
Bug when using
setEntrytoStringMethodon aCollectionField.In the Twig block
collection_entry_row(form_theme.html.twig), when generating the prototype, the parametervalueis NULL.How to reproduce:
Solution:
In the method
representAsString(EasyAdminTwigExtension.php) the test on aNULLvalue should be at the beginning of the method.