Refactor online plugin to Doctrine 2