symfony / recipes-contrib

Symfony Contrib Recipes Repositories

Home Page:https://github.com/symfony/recipes-contrib/blob/flex/main/RECIPES.md

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash when $choices' values are arrays

Daisuke-sama opened this issue · comments

Hi! I have one of my ENUM implemented like this

class VehicleColorType extends AbstractEnumType
{
    public const OTHER = 0;
    public const WHITE = 1;
    protected static $choices = [
        self::OTHER  => [
            'name' => 'Other',
            'code' => '',
        ],
        self::WHITE  => [
            'name' => 'White',
            'code' => '#FFFFFF',
        ],
   ];
}

And when I do, for example, findOneBy() request, I get an error like on the picture
image

What do you think?

I am sorry, but I have to close your issue as we use GitHub issues only to discuss new features and for bug reports. For support, please refer to one of the support channels. Thank you for understanding.