Update deprecated Doctrine method