Skip to content

Commit

Permalink
Merge branch '5.4' into 6.2
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
fabpot committed Mar 14, 2023
2 parents 30ab404 + 15715d4 commit 02dacf7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Dumper/CliDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut)
}
if ('' === $str) {
$this->line .= '""';
if ($cut) {
$this->line .= ''.$cut;
}
$this->endValue($cursor);
} else {
$attr += [
Expand Down
8 changes: 7 additions & 1 deletion Tests/Dumper/CliDumperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Symfony\Component\VarDumper\Tests\Dumper;

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

return $a;
},
'Symfony\Component\VarDumper\Tests\Fixture\DumbFoo' => function ($foo, $a) {
$a['foo'] = new CutStub($a['foo']);

return $a;
},
]);
Expand Down Expand Up @@ -76,7 +82,7 @@ public function testGet()
%A options: []
}
"obj" => Symfony\Component\VarDumper\Tests\Fixture\DumbFoo {#%d
+foo: "foo"
+foo: ""…3
+"bar": "bar"
}
"closure" => Closure(\$a, PDO &\$b = null) {#%d
Expand Down

0 comments on commit 02dacf7

Please sign in to comment.