update doctrine and fix deprecated method