You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@trigger_error('Passing a boolean flag to toogle object support is deprecated since version 3.1 and will be removed in 4.0. Use the DUMP_OBJECT flag instead.', E_USER_DEPRECATED);
55
+
56
+
$flags = (int) $flags;
57
+
}
58
+
51
59
$output = '';
52
60
$prefix = $indent ? str_repeat('', $indent) : '';
53
61
54
62
if ($inline <= 0 || !is_array($input) || empty($input)) {
@trigger_error('Passing a boolean flag to toogle object support is deprecated since version 3.1 and will be removed in 4.0. Use the Dumper::DUMP_OBJECT flag instead.', E_USER_DEPRECATED);
101
+
102
+
$flags = (int) $flags;
103
+
}
104
+
99
105
switch (true) {
100
106
caseis_resource($value):
101
107
if ($exceptionOnInvalidType) {
@@ -104,7 +110,7 @@ public static function dump($value, $exceptionOnInvalidType = false, $objectSupp
104
110
105
111
return'null';
106
112
caseis_object($value):
107
-
if ($objectSupport) {
113
+
if (Dumper::DUMP_OBJECT & $flags) {
108
114
return'!php/object:'.serialize($value);
109
115
}
110
116
@@ -114,7 +120,7 @@ public static function dump($value, $exceptionOnInvalidType = false, $objectSupp
$this->assertEquals('{ foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $dump, '->dump() is able to dump objects');
@trigger_error('Passing a boolean flag to toogle object support is deprecated since version 3.1 and will be removed in 4.0. Use the Dumper::DUMP_OBJECT flag instead.', E_USER_DEPRECATED);
0 commit comments