Skip to content

Commit 69776b1

Browse files
committed
remove reference to not existing YAML dumper flag
1 parent fe518d1 commit 69776b1

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)