From 7719e14d8082a8a86f563866f4e25797dd515069 Mon Sep 17 00:00:00 2001 From: Michael Moravec Date: Tue, 3 Oct 2017 19:25:56 +0200 Subject: [PATCH] BooleanEnum --- readme.md | 4 ++- src/Enum/Type/BooleanEnumType.php | 34 +++++++++++++++++++++ tests/Enum/Type/EnumTypeIntegrationTest.php | 4 +++ tests/Enum/Type/data/FooBooleanEnum.php | 13 ++++++++ tests/bootstrap.php | 2 ++ 5 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 src/Enum/Type/BooleanEnumType.php create mode 100644 tests/Enum/Type/data/FooBooleanEnum.php diff --git a/readme.md b/readme.md index 23c760d..d784f2a 100644 --- a/readme.md +++ b/readme.md @@ -32,7 +32,7 @@ Now you can use the `Sex` enum in your `User` entity. There are two important th You can specify any other parameters for `ORM\Column` as you would usually (nullability, length...). -There is also `integer_enum` and `float_enum` which can be used respectively for their types. +There is also `integer_enum`, `float_enum` and `boolean_enum` which can be used respectively for their types. 2) `@Enum(class=Sex::class)` - this will be used for reconstructing the `Sex` enum object when loading the value back from database @@ -139,6 +139,7 @@ composer require consistence/consistence-doctrine ```php