From fb0cc4dbe0b5a0427050943d7a41a2505ed80858 Mon Sep 17 00:00:00 2001
From: vnali <55586085+vnali@users.noreply.github.com>
Date: Thu, 28 Mar 2024 12:03:11 +0330
Subject: [PATCH 1/2] Fixed eager-loading example
---
docs/5.x/upgrade.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/5.x/upgrade.md b/docs/5.x/upgrade.md
index 1465bf716..de311b27d 100644
--- a/docs/5.x/upgrade.md
+++ b/docs/5.x/upgrade.md
@@ -287,7 +287,7 @@ This feature does have _some_ limitations, though. While it will work for all el
{% endif %}
{# Explicitly eager-loaded element: #}
- {{ entry.author.fullName }}
+ {{ article.author.fullName }}
{% endfor %}
```
From 5f0684941ae7a53798a98898fd45f0c4166528f6 Mon Sep 17 00:00:00 2001
From: vnali <55586085+vnali@users.noreply.github.com>
Date: Thu, 28 Mar 2024 12:10:32 +0330
Subject: [PATCH 2/2] Fixed twig examples
---
docs/5.x/upgrade.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/5.x/upgrade.md b/docs/5.x/upgrade.md
index de311b27d..d409604a9 100644
--- a/docs/5.x/upgrade.md
+++ b/docs/5.x/upgrade.md
@@ -243,7 +243,7 @@ We plan to introduce a console command to handle merging similar fields. There i
])
.all() %}
-{% for article in article %}
+{% for article in articles %}
{% set image = article.featureImage|first %}
{% if image %}
{{ image.getImg() }}
@@ -256,7 +256,7 @@ We plan to introduce a console command to handle merging similar fields. There i
.section('blog')
.all() %}
-{% for article in article %}
+{% for article in articles %}
{% set image = article.featureImage.eagerly().one() %}
{# Testing whether there was a result is still a good idea: #}
@@ -278,7 +278,7 @@ This feature does have _some_ limitations, though. While it will work for all el
])
.all() %}
-{% for article in article %}
+{% for article in articles %}
{# Lazily-eager-loaded relation: #}
{% set image = article.featureImage.eagerly().one() %}