LexikFormFilterBundle icon indicating copy to clipboard operation
LexikFormFilterBundle copied to clipboard

Condition $expression hint as string

Open zajca opened this issue 7 years ago • 1 comments

In examples like https://github.com/lexik/LexikFormFilterBundle/blob/master/Resources/doc/working-with-the-bundle.md#ii-filter-customization user can see return $filterQuery->createCondition($expression, $parameters); where $expressing can be Composite but internally phpdoc hint is string. This will throw error in static analysis like Phpstan. I suggests that this should be changed to mixed or in documentation should be $expression cast to string return $filterQuery->createCondition((string)$expression, $parameters);

zajca avatar Feb 28 '19 09:02 zajca

Same problem here, I will disable the error on PHPStan but even my IDE complains.

Is there a reason to have a string type in this phpdoc ?

FabienSalles avatar Jan 20 '21 08:01 FabienSalles