Skip to content

Commit bb7bc61

Browse files
Remove all "nullable-by-default-value" setters
1 parent 707a3f2 commit bb7bc61

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
---
66

77
* Add support for `FFI\CData` and `FFI\CType`
8+
* Deprecate calling `VarDumper::setHandler()` without arguments
89

910
5.4
1011
---

VarDumper.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ public static function dump(mixed $var)
4848

4949
public static function setHandler(callable $callable = null): ?callable
5050
{
51+
if (1 > \func_num_args()) {
52+
trigger_deprecation('symfony/va-dumper', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
53+
}
5154
$prevHandler = self::$handler;
5255

5356
// Prevent replacing the handler with expected format as soon as the env var was set:

0 commit comments

Comments
 (0)