SensioFrameworkExtraBundle icon indicating copy to clipboard operation
SensioFrameworkExtraBundle copied to clipboard

Support for `BackedEnum`

Open tarlepp opened this issue 2 years ago • 3 comments

It would be really great if BackedEnum are supported with IsGranted attribute.

tarlepp avatar May 09 '22 15:05 tarlepp

Symfony's voters don't support them properly yet, so that would be the first step, I suppose.

derrabus avatar May 09 '22 17:05 derrabus

@derrabus After reading this comment I think it's question if Symfony's voters will support BackedEnum any time soon. What about at least add support for BackedEnum<string> to the IsGranted constructor where we can get its value which is string and thus compatible with Symfony's voters?

trearcul avatar Jun 10 '22 18:06 trearcul

@trearcul If the voters don't support enums, IsGranted shouldn't either.

Please have a look at this RFC. If it passes, I wouldn't bother about this issue anympore.

derrabus avatar Jun 12 '22 15:06 derrabus