Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1fc6a54

Browse filesBrowse files
committed
feature #17705 [TwigBridge] deprecate the boolean object support trigger (xabbuh)
This PR was merged into the 3.1-dev branch. Discussion ---------- [TwigBridge] deprecate the boolean object support trigger | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | This reflects the changes done in the Yaml component in #17578. Commits ------- 27243c6 deprecate the boolean object support trigger
2 parents 61575e7 + 27243c6 commit 1fc6a54
Copy full SHA for 1fc6a54

File tree

1 file changed

+2
-1
lines changed
Filter options

1 file changed

+2
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Extension/YamlExtension.php
+2-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.