[2.2] Change usage from deprecated methods

This PR updates the bundle to not use the deprecated method getEntityManager() and the Min and MinLength constraints (both deprecated as well).