Skip to content

Commit 63ae307

Browse files
committed
feature #59254 [JsonEncoder] Remove chunk size definition (mtarld)
This PR was merged into the 7.3 branch. Discussion ---------- [JsonEncoder] Remove chunk size definition | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | | License | MIT Remove the `$forceEncodeChunks` boolean. This boolean was telling if the encoder should use `json_encode` or should yield as small strings as possible. It was set to `false` by default and not easily configurable yet. This configurable behavior has been removed. Instead, we use `json_encode` directly if **the value that does not contain any object**. Otherwise, it'll be split (see the diff in `src/Symfony/Component/JsonEncoder/Tests/Fixtures/encoder/object_in_object.php`) IMHO, this will fit most of the use cases, and remove a configuration complicated to understand. Commits ------- 86274994ff [JsonEncoder] Remove chunk size definition
2 parents 7b11774 + bc39c5b commit 63ae307

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Resources/config/json_encoder.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
tagged_locator('json_encoder.normalizer'),
3333
service('json_encoder.encode.property_metadata_loader'),
3434
param('.json_encoder.encoders_dir'),
35-
false,
3635
])
3736
->set('json_encoder.decoder', JsonDecoder::class)
3837
->args([
@@ -113,7 +112,6 @@
113112
service('json_encoder.decode.property_metadata_loader'),
114113
param('.json_encoder.encoders_dir'),
115114
param('.json_encoder.decoders_dir'),
116-
false,
117115
service('logger')->ignoreOnInvalid(),
118116
])
119117
->tag('kernel.cache_warmer')

0 commit comments

Comments
 (0)