a fork for sfDoctrineGuardPlugin