I need to inject two objects into ImageService. One of them is an instance of Repository/ImageRepository, which I get like this:
ImageService
Repository/ImageRepository
$
In case if do not want to define each repository as a service, starting from version 2.4 you can do following, (default is a name of the entity manager):
2.4
default
@=service('doctrine.orm.default_entity_manager').getRepository('MycompanyMainBundle:Image')