SetParametersArrayToCollectionRector

Change the argument type for setParameters from array to ArrayCollection and Parameter calls

-$entityManager->createQueryBuilder()->setParameters([
-    'foo' => 'bar'
-]);
+$entityManager->createQueryBuilder()->setParameters(new \Doctrine\Common\Collections\ArrayCollection([
+    new \Doctrine\ORM\Query\Parameter('foo', 'bar')
+]));

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Doctrine\Orm30\Rector\MethodCall\SetParametersArrayToCollectionRector;

return RectorConfig::configure()
    ->withRules([
        SetParametersArrayToCollectionRector::class,
    ]);