Skip to content

Commit 92cfb30

Browse files
committed
minor #19505 [VarDumper] Add return to VarDumper::setHandler() (N-Silbernagel)
This PR was merged into the 6.4 branch. Discussion ---------- [VarDumper] Add return to `VarDumper::setHandler()` In the Documentation for the VarDumper component in the "The Dump server" section, the code for configuring the Dump Server outside of a symfony application has an error. The "setHandler" callback has the return type "?string" but is missing a return statement. This results in the error "{closure}(): Return value must be of type ?string, none returned". Commits ------- 7a4abe3 Add return to non-symfony VarDumper::setHandler
2 parents 8c5a356 + 7a4abe3 commit 92cfb30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/var_dumper.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Outside a Symfony application, use the :class:`Symfony\\Component\\VarDumper\\Du
170170
]);
171171

172172
VarDumper::setHandler(function (mixed $var) use ($cloner, $dumper): ?string {
173-
$dumper->dump($cloner->cloneVar($var));
173+
return $dumper->dump($cloner->cloneVar($var));
174174
});
175175

176176
.. note::

0 commit comments

Comments
 (0)