Either avoid or explicitly test binary encoding in default configuration

Created on 23 November 2016, over 7 years ago
Updated 28 March 2024, 3 months ago

Problem/Motivation

Opening this from #2712647: Update Symfony components to ~3.2 β†’ .

+++ b/core/modules/file/config/optional/views.view.files.yml
@@ -565,7 +565,7 @@ display:
-          format_plural_string: "1 place\x03@count places"
+          format_plural_string: !!binary MSBwbGFjZQNAY291bnQgcGxhY2Vz

@@ -1007,7 +1007,7 @@ display:
-          format_plural_string: "1\x03@count"
+          format_plural_string: !!binary MQNAY291bnQ=

Symfony 3.1 introduces automatic binary encoding. Our format plural uses the x03 escape character as a separator, this results in the diff above, which is not an improvement.

Additionally, the only test coverage we have of this is due to views.views.files.yml - if for some reason that stopped using format plural we'd not have noticed the change in behaviour. This wouldn't have been a bug as such, but it means diffs between YAML output from pecl_yaml vs. symfony as well as vs. YAML that's imported, exported, then exported again.

Proposed resolution

Consider using a different separator that doesn't result in binary encoding, so that YAML files remain human-readable/writable (which was supposed to be the point of using YAML in the first place).

If for some reason that's not possible, add a test configuration file (could be a copy of views.view.files.yml) so the behaviour we have is documented. Even if we do make the change we could have a test YAML file with format plural usage.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
ConfigurationΒ  β†’

Last updated about 16 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024