EasyAdminBundle
EasyAdminBundle copied to clipboard
Support for objects in ChoiceField
I currently working on a project which uses the oauth server and clients from league. The server is using values objects for grants, redirect uris and scopes.
Just by using a ChoiceField I got the error:
Uncaught PHP Exception TypeError: "Cannot access offset of type League\Bundle\OAuth2ServerBundle\ValueObject\Grant on array" at ChoiceConfigurator.php line 142 {"exception":"[object] (TypeError(code: 0): Cannot access offset of type League\\Bundle\\OAuth2ServerBundle\\ValueObject\\Grant on array at [...]/vendor/easycorp/easyadmin-bundle/src/Field/Configurator/ChoiceConfigurator.php:142)"} []
This is a simple fix to provide support for any object which implements stringable.