Житель Земли

Results 4 comments of Житель Земли

### A way to work with ENUMS: ```php enum MyEnum : string { case READY = 'в очереди'; case PROCESSING = 'обрабатывается'; case REJECTED = 'забраковано'; public static function getAsAssociatedArray...

@michelbrons And both ways will work? {{ dump(my_enums.ready.name) }} {{ dump(my_enums.READY.value) }} TWIG code more accurate and readable when all in lower_snake_case, BUT sometimes more visually usefull UPPERCASE 😎

@michelbrons It is possible, you can fork TWIG and add that check, then pull request to main repo. TWIG already cheking methods: `some.method` `getMethod, isMethod, hasMethod, method`

> Why pass ENUM through controller? Use global solution: [#3681 (comment)](https://github.com/twigphp/Twig/issues/3681#issuecomment-1159029881) > > I use it in production :) Depends from how many templates use enum, if only one, controller...