Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 27243c6

Browse files
committed
deprecate the boolean object support trigger
1 parent 15b00cc commit 27243c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Bridge/Twig/Extension/YamlExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public function encode($input, $inline = 0, $dumpObjects = false)
3939
$dumper = new YamlDumper();
4040
}
4141

42-
if (defined('Symfony\Component\Yaml\Yaml::DUMP_OBJECT')) {
42+
if (defined('Symfony\Component\Yaml\Yaml::DUMP_OBJECT') && is_bool($dumpObjects)) {
43+
@trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::DUMP_OBJECT flag instead.', E_USER_DEPRECATED);
4344
$dumpObjects = (int) $dumpObjects;
4445
}
4546

0 commit comments

Comments
 (0)