File tree 3 files changed +9
-3
lines changed
3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ You can find and compare releases at the [GitHub release page](https://github.co
9
9
10
10
## Unreleased
11
11
12
+ ## v15.14.3
13
+
14
+ ### Fixed
15
+
16
+ - Serialize ` BackedEnum ` instances by name, not value https://github.com/webonyx/graphql-php/pull/1618
17
+
12
18
## v15.14.2
13
19
14
20
### Changed
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ public function serialize($value)
137
137
}
138
138
139
139
if (is_a ($ value , \BackedEnum::class)) {
140
- return $ value ->value ;
140
+ return $ value ->name ;
141
141
}
142
142
143
143
if (is_a ($ value , \UnitEnum::class)) {
Original file line number Diff line number Diff line change 4
4
5
5
enum BackedPhpEnum: string
6
6
{
7
- case A = 'A ' ;
7
+ case A = 'a ' ;
8
8
case B = 'B ' ;
9
- case C = 'C ' ;
9
+ case C = 'the value does not really matter ' ;
10
10
}
You can’t perform that action at this time.
0 commit comments