Fork from sfDoctrineGuardPlugin