Skip to content

Commit adb6dce

Browse files
committed
minor #16526 [Yaml] remove reference to not existing YAML dumper flag (xabbuh)
This PR was merged into the 4.4 branch. Discussion ---------- [Yaml] remove reference to not existing YAML dumper flag fixes #16508 Commits ------- 69776b1 remove reference to not existing YAML dumper flag
2 parents fe518d1 + 69776b1 commit adb6dce

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

components/yaml.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,15 +341,14 @@ syntax to parse them as proper PHP constants::
341341
Parsing and Dumping of Binary Data
342342
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
343343

344-
You can dump binary data by using the ``DUMP_BASE64_BINARY_DATA`` flag::
344+
Non UTF-8 encoded strings are dumped as base64 encoded data::
345345

346346
$imageContents = file_get_contents(__DIR__.'/images/logo.png');
347347

348-
$dumped = Yaml::dump(['logo' => $imageContents], 2, 4, Yaml::DUMP_BASE64_BINARY_DATA);
348+
$dumped = Yaml::dump(['logo' => $imageContents]);
349349
// logo: !!binary iVBORw0KGgoAAAANSUhEUgAAA6oAAADqCAY...
350350

351-
Binary data is automatically parsed if they include the ``!!binary`` YAML tag
352-
(there's no need to pass any flag to the Yaml parser)::
351+
Binary data is automatically parsed if they include the ``!!binary`` YAML tag::
353352

354353
$dumped = 'logo: !!binary iVBORw0KGgoAAAANSUhEUgAAA6oAAADqCAY...';
355354
$parsed = Yaml::parse($dumped);

0 commit comments

Comments
 (0)