From 731c7344628fb5b23dda80e684391de6ff3529e5 Mon Sep 17 00:00:00 2001
From: xjm <xjm@65776.no-reply.drupal.org>
Date: Sun, 12 Nov 2023 09:53:06 -0600
Subject: [PATCH] Issue #3383692 by Murz, xjm, smustgrave: Document that NULL
 is an allowed return value for
 EntityRepositoryInterface::getTranslationFromContext()

---
 core/lib/Drupal/Core/Entity/EntityRepositoryInterface.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/lib/Drupal/Core/Entity/EntityRepositoryInterface.php b/core/lib/Drupal/Core/Entity/EntityRepositoryInterface.php
index f8623afcaed9..27cfa7255921 100644
--- a/core/lib/Drupal/Core/Entity/EntityRepositoryInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityRepositoryInterface.php
@@ -64,8 +64,9 @@ public function loadEntityByConfigTarget($entity_type_id, $target);
    *   (optional) An associative array of arbitrary data that can be useful to
    *   determine the proper fallback sequence.
    *
-   * @return \Drupal\Core\Entity\EntityInterface
-   *   An entity object for the translated data.
+   * @return \Drupal\Core\Entity\EntityInterface|null
+   *   An entity object for the translated data, or NULL if the requested
+   *   translation is missing, forbidden, or unavailable.
    *
    * @see \Drupal\Core\Language\LanguageManagerInterface::getFallbackCandidates()
    */
-- 
GitLab