Thank you for joining us at DotAll 2023! We were thrilled to be able to show off our progress on Craft 5. Here’s a quick recap of what we covered.

<aside> <img src="/icons/alien-pixel_purple.svg" alt="/icons/alien-pixel_purple.svg" width="40px" /> Join us in the official Discord, and post your questions in the #workshop channel!

</aside>

If you’re arriving here just after Brandon’s presentation, go ahead and jump down to the install + upgrade section, or the group activity!


This is our most significant update to Craft’s core content modeling tools, ever. We hope you and your clients are as excited as we are about all the new ways to express and use complex data in the control panel—and your front-ends.

PHP 8.2

Craft’s PHP requirement has been bumped from 8.0.2 to 8.2. Craft 5 uses some of these neat new language features:

<aside> <img src="/icons/hourglass_lightgray.svg" alt="/icons/hourglass_lightgray.svg" width="40px" /> Keep in mind that dynamic class properties are now deprecated!

</aside>

Lazy Eager Loading

Eager-loading maps no longer need to be assembled prior to executing a root query. Instead, call .eagerly() when using nested elements, and Craft will build the eager-loading plan, automatically.

Before:

{% set query = craft.entries()
  .section('mySection')
  .with([
    'featuredImage',
    'builder:builder.furtherReading',
  ]) %}

{% for entry in query.all() %}
  {{ entry.featuredImage|first.img }}
  
  {% for block in entry.builder.all() %}
    {{ ul(block.furtherReading.all()|map(e => e.link)) }}
  {% endfor %}
{% endfor %}

After: