Problem/Motivation

This is a followup to #2341357: Views entity area config is not deployable and missing dependencies, where a new method (EntityManagerInterface::loadEntityByConfigTarget()) was introduced with a return value that I believe is incorrect.

Proposed resolution

Fix it.

Remaining tasks

Review & commit.

User interface changes

Nope.

API changes

No.

Beta eval: This is an unfrozen change: API docs bug fix.

Comments

amateescu’s picture

Status: Active » Needs review
StatusFileSize
new1.45 KB

For example, Drupal\Core\Entity\Entity::load() does not mention |null in the @return doc, so I think loadEntityByConfigTarget() and loadEntityByUuid() should do the same.

dawehner’s picture

Status: Needs review » Needs work

I'm quite convinced that this is not the right thing to do, adding |null gives you additional information

$ ag "\|null" | wc -l
     798
shashikant_chauhan’s picture

Added 'null' and recreated patch based on #1

shashikant_chauhan’s picture

Status: Needs work » Needs review
amateescu’s picture

StatusFileSize
new2.3 KB
new1.93 KB

The initial patch also fixed the UUID part in the doc, which actually had to reference 'target'. Let's also fix the documentation for Drupal\Core\Entity\Entity::load() and loadMultiple() while we're there.

Interdiff is to #1.

jhodgdon’s picture

One nitpick:

    * @return static[]
-   *   An array of entity objects indexed by their IDs.
+   *   An array of entity objects indexed by their IDs. Returns an empty array
+   *   if no matching entities found.
    */
   public static function loadMultiple(array $ids = NULL) {

==> ... if no matching entities are found.

The other changes look good, if everyone agrees they are factually correct.

jhodgdon’s picture

Status: Needs review » Needs work
amateescu’s picture

Status: Needs work » Needs review
StatusFileSize
new4.12 KB
new2.37 KB

The string from #6 also exists in a bunch of other places so I updated all of them for consistency.

jhodgdon’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

A bit out of scope for this issue, but a good fix.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Documentation is not frozen in beta. Committed 097b83f and pushed to 8.0.x. Thanks!

  • alexpott committed 097b83f on 8.0.x
    Issue #2417339 by amateescu, shashikant_chauhan: Fix @return...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.