Skip to content

Documentation should provide guidance on injecting ORM entity manager into a service #2224

Closed
@thepurpleblob

Description

@thepurpleblob

I would have thought that the number one use-case for a Service class would be to do 'stuff' in the database. In a different world you might want to call this the 'model'. However, I can find nowhere in the documentation that explains how to do this. The Service page in The Book is quite a lengthy read and I think it separates the bits most people will want (how to make a service and how to inject 'something') by a lot of more advanced discussion.

Anyway, as a reasonably new user, I would really have appreciated an early example of "Here's a simple Service that knows how to access the database". That is (unless I am missing something) completely absent. It had to go to StackOverflow to discover I needed to inject '@doctrine.orm.entity_manager' which is arcane to a newbie (and possibly non-newbies)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions