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 @@ -239,6 +239,11 @@ representation of the object.
239239 parsers will likely not recognize the ``php/object `` tag and non-PHP
240240 implementations certainly won't - use with discretion!
241241
242+ .. danger ::
243+
244+ Parsing ``!php/object `` tags uses PHP deserialization internally. Never
245+ enable ``PARSE_OBJECT `` for untrusted YAML contents.
246+
242247Parsing and Dumping Objects as Maps
243248~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
244249
@@ -324,6 +329,11 @@ syntax to parse them as proper PHP constants::
324329 $parameters = Yaml::parse($yaml, Yaml::PARSE_CONSTANT);
325330 // $parameters = ['foo' => 'PHP_INT_SIZE', 'bar' => 8];
326331
332+ .. warning ::
333+
334+ Enabling ``PARSE_CONSTANT `` allows YAML contents to resolve arbitrary PHP
335+ constants and enum cases. Only enable it for trusted input.
336+
327337Parsing PHP Enumerations
328338~~~~~~~~~~~~~~~~~~~~~~~~
329339
You can’t perform that action at this time.
0 commit comments