Closed
Description
While technically correct, the change in 716a70d leads to false positive reports for code like this:
$abc = $request->query->get('abc');
Assert::notNull($abc);
expectString($abc); // 💥 Parameter #1 $str of function expectString expects string, bool|float|int|string given.
AFAIK Symfony never converts query string values from string
to other types. So unless the $defaultValue
argument is specified, InputBag::get()
always returns string|null
. And if $defaultValue
is specified, the return type should be string|T
where T
extends string|int|float|bool|null
.
Metadata
Metadata
Assignees
Labels
No labels