Skip to content

Commit 02dacf7

Browse files
committed
Merge branch '5.4' into 6.2
* 5.4: Fix some Composer keywords [FrameworkBundle] Rename limiter’s `strategy` to `policy` in XSD [VarDumper] Fixed dumping of CutStub Fix test Change limit argument from string to integer. [Messenger] Fix `evaluate()` calls in `WorkerTest` [Mailer] STDOUT blocks infinitely under Windows when STDERR is filled
2 parents 30ab404 + 15715d4 commit 02dacf7

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Dumper/CliDumper.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut)
184184
}
185185
if ('' === $str) {
186186
$this->line .= '""';
187+
if ($cut) {
188+
$this->line .= ''.$cut;
189+
}
187190
$this->endValue($cursor);
188191
} else {
189192
$attr += [

Tests/Dumper/CliDumperTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\VarDumper\Tests\Dumper;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Component\VarDumper\Caster\CutStub;
1516
use Symfony\Component\VarDumper\Cloner\VarCloner;
1617
use Symfony\Component\VarDumper\Dumper\AbstractDumper;
1718
use Symfony\Component\VarDumper\Dumper\CliDumper;
@@ -37,6 +38,11 @@ public function testGet()
3738
':stream' => function ($res, $a) {
3839
unset($a['uri'], $a['wrapper_data']);
3940

41+
return $a;
42+
},
43+
'Symfony\Component\VarDumper\Tests\Fixture\DumbFoo' => function ($foo, $a) {
44+
$a['foo'] = new CutStub($a['foo']);
45+
4046
return $a;
4147
},
4248
]);
@@ -76,7 +82,7 @@ public function testGet()
7682
%A options: []
7783
}
7884
"obj" => Symfony\Component\VarDumper\Tests\Fixture\DumbFoo {#%d
79-
+foo: "foo"
85+
+foo: ""…3
8086
+"bar": "bar"
8187
}
8288
"closure" => Closure(\$a, PDO &\$b = null) {#%d

0 commit comments

Comments
 (0)