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

Open
opened 2026-01-22 15:26:51 +01:00 by admin · 0 comments
Owner

Originally created by @olberger on GitHub (Nov 20, 2018).

Bug Report

(resubmitted from previous attempt badly filed under https://github.com/doctrine/doctrine-website-build-prod/issues/2)

Summary

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.).

Current behavior

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

The mechanism isn't really documented, and is just given as 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."

Expected behavior

The docs should give such findBy* "magic" methods some name, and some more explicit reference point so that one can point to it, either to recommend, or to warn against their use.

Thanks in advance.

Originally created by @olberger on GitHub (Nov 20, 2018). ### Bug Report (resubmitted from previous attempt badly filed under https://github.com/doctrine/doctrine-website-build-prod/issues/2) #### Summary 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.). #### Current behavior 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 The mechanism isn't really documented, and is just given as 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." #### Expected behavior The docs should give such findBy* "magic" methods some name, and some more explicit reference point so that one can point to it, either to recommend, or to warn against their use. Thanks in advance.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6107