````yaml
parameters:
    acme_demo.provider.endpoint.class: Acme\DemoBundle\Repository\RouteProvider

services:
    acme_demo.provider.endpoint:
        class: "%acme_demo.provider.endpoint.class%"
        calls:
            - [setDocumentRegistry, ["@doctrine_phpcr"]]
````

Btw, why don't you use constructor injection?