Skip to content

Commit 7e132a3

Browse files
Merge branch '4.4' into 5.4
* 4.4: [VarDumper] Fix dumping floats on PHP8 Fix dumping enums on PHP 8.2 [Cache] Prevent fatal errors on php 8 when running concurrently with TagAwareAdapter v6.1
2 parents 7eacaa5 + bc5f57a commit 7e132a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Internal/Exporter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,13 @@ public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount
193193
public static function export($value, string $indent = '')
194194
{
195195
switch (true) {
196-
case \is_int($value) || \is_float($value) || $value instanceof \UnitEnum: return var_export($value, true);
196+
case \is_int($value) || \is_float($value): return var_export($value, true);
197197
case [] === $value: return '[]';
198198
case false === $value: return 'false';
199199
case true === $value: return 'true';
200200
case null === $value: return 'null';
201201
case '' === $value: return "''";
202+
case $value instanceof \UnitEnum: return ltrim(var_export($value, true), '\\');
202203
}
203204

204205
if ($value instanceof Reference) {

0 commit comments

Comments
 (0)