New rule for "Passing an array for the first argument to QueryBuilder::select() is deprecated"
rpkamp opened this issue ยท 6 comments
rpkamp commented
We're getting the following deprecation warnings from Doctrine DBAL:
Passing an array for the first argument to QueryBuilder::select() is deprecated, pass each value as an individual variadic argument instead.
So for example
$queryBuilder->select(['field1', 'field2', 'field3', 'etc']);
should become
$queryBuilder->select('field1', 'field2', 'field3', 'etc');
TomasVotruba commented
@samsonasik Hi Abdul, could you cover this with new rule or close it?
samsonasik commented
@TomasVotruba I will try,
@rpkamp what doctrine specific version that start deprecating it?
TomasVotruba commented
@samsonasik I think the first version is doctrine/dbal 2.11 - doctrine/dbal#3853, doctrine/dbal#3837
samsonasik commented
Ok ๐
samsonasik commented
rpkamp commented
Thanks @samsonasik !