doctrine / doctrine-website-build-prod

Generated website artifacts. See https://www.doctrine-project.org/contribute/website/
https://doctrine-project.org
5 stars 4 forks source link

Document "magic finder" calls in more comprehensive and referenceable way #2

Closed olberger closed 6 years ago

olberger commented 6 years ago

I think the findBy* "magic" finder methods would deserve a better and more explicit documentation, which would also deserve a referenceable anchor (for pointing to it from other docs, like Symfony's, etc.).

The docs mention that "An EntityRepository also provides a mechanism for more concise calls through its use of call" (later the code mentions the "call magic"), in https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/working-with-objects.html#entities-and-the-identity-map

AFAIU, this is here: https://github.com/doctrine/doctrine-website-build-prod/blob/bdf72516f727f3efa70c6db187eb7e8601ef2e9e/projects/doctrine-orm/en/latest/reference/working-with-objects.html#L1004

The mechanism isn't really documented, and is just an example.

https://www.doctrine-project.org/api/orm/2.7/Doctrine/ORM/EntityRepository.html#method___call is rather sybylline ins this respect too: "Adds support for magic method calls."

Thanks in advance.

Ocramius commented 6 years ago

I'd rather say that their usage should be discouraged: an associative array will provide better introspection here.

Anyway, sources for the docs of the ORM are in https://github.com/doctrine/doctrine2 - closing here.

olberger commented 6 years ago

My bad... it's not obvious from the outside what this repo is about... may I suggest to improve its description in its github landing page ?

Ocramius commented 6 years ago

Good call, shall do 👍

On Tue, 20 Nov 2018, 15:50 Olivier Berger <notifications@github.com wrote:

My bad... it's not obvious from the outside what this repo is about... may I suggest to improve its description in its github landing page ?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/doctrine/doctrine-website-build-prod/issues/2#issuecomment-440299507, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJakFXfii1bCd9GT9BDaZQnJped2QsCks5uxBavgaJpZM4YoC8z .