8000 bug #46676 [DoctrineBridge] Extend type guessing on enum fields (Gigi… · symfony/http-kernel@0939810 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0939810

Browse files
bug #46676 [DoctrineBridge] Extend type guessing on enum fields (Gigino Chianese)
This PR was merged into the 4.4 branch. Discussion ---------- [DoctrineBridge] Extend type guessing on enum fields | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Doctrine supports enumType on array values, while the current implementation always assumes the value to be an enum object, if enumType is set. If $typeOfField is `json_array` the collectionKeyType will still be null, while collectionValueType will be filled. That's because we have no way to determine from doctrine metadata, if the key is string or int. Yet I don't know if that's a valid thing to do, otherwise we should return null in that case. Commits ------- 79239feaab CS fix a9b0f43366 [DoctrineBridge] Extend type guessing on enum fields
2 parents 9c9cb20 + 46bff0d commit 0939810

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

DataCollector/MemoryDataCollector.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,8 @@ private function convertToBytes(string $memoryLimit)
114114

115115
switch (substr($memoryLimit, -1)) {
116116
case 't': $max *= 1024;
117-
// no break
118117
case 'g': $max *= 1024;
119-
// no break
120118
case 'm': $max *= 1024;
121-
// no break
122119
case 'k': $max *= 1024;
123120
}
124121

0 commit comments

Comments
 (0)
0