Change Doctrine\DBAL\Connection and Doctrine\DBAL\Driver\ResultStatement ->fetchAll() to ->fetchAllAssociative() and other replacements
use Doctrine\DBAL\Connection;
class SomeClass
{
public function run(Connection $connection)
{
- return $connection->fetchAll();
+ return $connection->fetchAllAssociative();
}
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Doctrine\Dbal211\Rector\MethodCall\ReplaceFetchAllMethodCallRector;
return RectorConfig::configure()
->withRules([
ReplaceFetchAllMethodCallRector::class,
]);