From 54c0e6f66b93ab2bc913729298ebe74737ccfb4b Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 18 Mar 2024 00:00:37 +0000 Subject: [PATCH] Add daily email for 2024-03-18 Automated Drupal 11 compatibility fixes --- source/_daily_emails/2024-03-18.md | 40 ++++++++++++++++++++++++++++++ source/_layouts/page.html.twig | 1 + 2 files changed, 41 insertions(+) create mode 100644 source/_daily_emails/2024-03-18.md diff --git a/source/_daily_emails/2024-03-18.md b/source/_daily_emails/2024-03-18.md new file mode 100644 index 000000000..8d0eac8e5 --- /dev/null +++ b/source/_daily_emails/2024-03-18.md @@ -0,0 +1,40 @@ +--- +title: Automated Drupal 11 compatibility fixes +date: 2024-03-18 +permalink: archive/2024/03/18/automated-drupal-11-compatibility-fixes +tags: + - software-development + - drupal + - php +cta: d7eol +snippet: | + First "Automated Drupal 11 compatibility fixes" email spotted... +--- + +Yesterday, I received the first "Automated Drupal 11 compatibility fixes" email from the Rector-powered Project Update Bot. + +It was for the [Feature Toggle Twig module](https://www.drupal.org/project/feature_toggle_twig) that adds a `featureIsEnabled()` function to Twig to check if a feature toggle is enabled. + +For example: + +```language-twig +{% verbatim -%} +{% if featureIsEnabled('foo') %} + {# ... #} +{% endif %} +{%- endverbatim %} +``` + +## What Changes Were Needed? + +The only change needed to make the module Drupal 11 compatible was updating the `core_version_requirement` to `^10 || ^11` - allowing the module to support Drupal 10 and 11 at the same time as it uses no deprecated code. + +That's a great thing about modern Drupal compared to legacy versions - no major changes or rewrites to support a new major version! + +## Here's the Thing + +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. + +I look forward to getting more of these emails for my [other contributed projects on Drupal.org][override node options]. + +[override node options]: {{site.url}}/archive/2024/03/09/override-node-options-40624-drupal-websites diff --git a/source/_layouts/page.html.twig b/source/_layouts/page.html.twig index 67aa7409e..d1570d4f5 100644 --- a/source/_layouts/page.html.twig +++ b/source/_layouts/page.html.twig @@ -17,6 +17,7 @@ {% block scripts %} + {% endblock %}