rectorphp/rector-doctrine

fetchColumn to fetchOne wont apply on Doctrine\DBAL\Result

Closed this issue · 1 comments

With doctrine-dbal-211.php we added multiple rename method rules for:
Doctrine\\DBAL\\Connection
and
Doctrine\\DBAL\\Statement

i Have the following query that wont be updated:

return (int) $this->_em->getConnection()
            ->executeQuery("SELECT x")
            ->fetchColumn();

as executeQuery returns a Doctrine\DBAL\Result, we should probably add this one as well as when i update the function call it works as expected the rule looks like:

new MethodCallRename('Doctrine\\DBAL\\Result', 'fetchColumn', 'fetchOne'),

Can i add this?

@JohJohan feel free to create a PR with comment reference of change on doctrine 2.11