File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## Changes made in ` EnumInterface `
2
+
3
+ - ` Yokai\EnumBundle\EnumInterface::getChoices ` must now return the enum labels as keys of the array.
4
+ - ` Yokai\EnumBundle\EnumInterface::getValues ` was introduced
5
+ and must return all possible enum values.
6
+ - ` Yokai\EnumBundle\EnumInterface::getLabel ` was introduced
7
+ and must return the associated label of any provided enum value.
8
+
9
+ ## Changes made in enum base classes
10
+
11
+ - ` Yokai\EnumBundle\AbstractTranslatedEnum ` was removed,
12
+ you can now extend ` Yokai\EnumBundle\TranslatedEnum ` and provide values as constructor argument.
13
+ - ` Yokai\EnumBundle\ConfigurableTranslatedEnum ` was removed,
14
+ you can now extend ` Yokai\EnumBundle\TranslatedEnum ` instead.
15
+ - ` Yokai\EnumBundle\Enum ` was introduced,
16
+ you can now extend this class and provide choices and names as constructor arguments (recommended).
17
+
18
+ ## Changes made to other classes
19
+
20
+ - Non enum classes were all made final.
21
+ - ` enum_label ` Twig function was removed (use ` enum_label ` Twig filter instead).
22
+ - Most methods now throw exceptions that implements (` Yokai\EnumBundle\Exception\ExceptionInterface ` ).
23
+
24
+ ## Changes made in documentation
25
+
26
+ - Due to how popular [ service discovering] ( https://symfony.com/blog/new-in-symfony-3-3-psr-4-based-service-discovery ) has become,
27
+ doc will only show how to create an enum by creating a new class.
28
+ But it is still 100% valid to create new enums without creating a class.
You can’t perform that action at this time.
0 commit comments