File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,11 @@ representation of the object.
241241 parsers will likely not recognize the ``php/object `` tag and non-PHP
242242 implementations certainly won't - use with discretion!
243243
244+ .. danger ::
245+
246+ Parsing ``!php/object `` tags uses PHP deserialization internally. Never
247+ enable ``PARSE_OBJECT `` for untrusted YAML contents.
248+
244249Parsing and Dumping Objects as Maps
245250~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
246251
@@ -326,6 +331,11 @@ syntax to parse them as proper PHP constants::
326331 $parameters = Yaml::parse($yaml, Yaml::PARSE_CONSTANT);
327332 // $parameters = ['foo' => 'PHP_INT_SIZE', 'bar' => 8];
328333
334+ .. warning ::
335+
336+ Enabling ``PARSE_CONSTANT `` allows YAML contents to resolve arbitrary PHP
337+ constants and enum cases. Only enable it for trusted input.
338+
329339Parsing PHP Enumerations
330340~~~~~~~~~~~~~~~~~~~~~~~~
331341
You can’t perform that action at this time.
0 commit comments