you should inject the registry instead, to support multiple managers (like in the DoctrineType)