oliverdavies.uk/content/node.2c5bbb3d-d8f4-496c-ae72-b739f5b1a90c.yml

90 lines
4 KiB
YAML

uuid:
- value: 2c5bbb3d-d8f4-496c-ae72-b739f5b1a90c
langcode:
- value: en
type:
- target_id: daily_email
target_type: node_type
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
revision_timestamp:
- value: '2025-05-11T09:00:18+00:00'
revision_uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
revision_log: { }
status:
- value: true
uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
title:
- value: 'Automated Drupal 11 compatibility fixes'
created:
- value: '2024-03-18T00:00:00+00:00'
changed:
- value: '2025-05-11T09:00:18+00:00'
promote:
- value: false
sticky:
- value: false
default_langcode:
- value: true
revision_translation_affected:
- value: true
path:
- alias: /daily/2024/03/18/automated-drupal-11-compatibility-fixes
langcode: en
body:
- value: |
<p>Yesterday, I received the first "Automated Drupal 11 compatibility fixes" email from the Rector-powered Project Update Bot.</p>
<p>It was for the <a href="https://www.drupal.org/project/feature_toggle_twig">Feature Toggle Twig module</a> that adds a <code>featureIsEnabled()</code> function to Twig to check if a feature toggle is enabled.</p>
<p>For example:</p>
<pre><code class="language-twig">{% if featureIsEnabled('foo') %}
{# ... #}
{% endif %}
</code></pre>
<h2 id="what-changes-were-needed%3F">What Changes Were Needed?</h2>
<p>The only change needed to make the module Drupal 11 compatible was updating the <code>core_version_requirement</code> to <code>^10 || ^11</code> - allowing the module to support Drupal 10 and 11 at the same time as it uses no deprecated code.</p>
<p>That's a great thing about modern Drupal compared to legacy versions - no major changes or rewrites to support a new major version!</p>
<h2 id="here%27s-the-thing">Here's the Thing</h2>
<p>I thought this was a great initiative in previous versions and I'm glad to see it again for Drupal 11, and it's great that it's being done with time before the Drupal 11 release as it gives maintainers the time to update their projects so as many modules as possible will be Drupal 11-compatible when it's released.</p>
<p>I look forward to getting more of these emails for my <a href="/daily/2024/03/09/override-node-options-40624-drupal-websites">other contributed projects on Drupal.org</a>.</p>
format: full_html
processed: |
<p>Yesterday, I received the first "Automated Drupal 11 compatibility fixes" email from the Rector-powered Project Update Bot.</p>
<p>It was for the <a href="https://www.drupal.org/project/feature_toggle_twig">Feature Toggle Twig module</a> that adds a <code>featureIsEnabled()</code> function to Twig to check if a feature toggle is enabled.</p>
<p>For example:</p>
<pre><code class="language-twig">{% if featureIsEnabled('foo') %}
{# ... #}
{% endif %}
</code></pre>
<h2 id="what-changes-were-needed%3F">What Changes Were Needed?</h2>
<p>The only change needed to make the module Drupal 11 compatible was updating the <code>core_version_requirement</code> to <code>^10 || ^11</code> - allowing the module to support Drupal 10 and 11 at the same time as it uses no deprecated code.</p>
<p>That's a great thing about modern Drupal compared to legacy versions - no major changes or rewrites to support a new major version!</p>
<h2 id="here%27s-the-thing">Here's the Thing</h2>
<p>I thought this was a great initiative in previous versions and I'm glad to see it again for Drupal 11, and it's great that it's being done with time before the Drupal 11 release as it gives maintainers the time to update their projects so as many modules as possible will be Drupal 11-compatible when it's released.</p>
<p>I look forward to getting more of these emails for my <a href="http://default/daily/2024/03/09/override-node-options-40624-drupal-websites">other contributed projects on Drupal.org</a>.</p>
summary: null
field_daily_email_cta: { }