diff --git a/.cspell-project-words.txt b/.cspell-project-words.txt
index 3ce1070..4b543d5 100644
--- a/.cspell-project-words.txt
+++ b/.cspell-project-words.txt
@@ -47,3 +47,4 @@ msword
officedocument
openxmlformats
wordprocessingml
+datetimeplus
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9c5cadf..359b9d3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,11 +12,11 @@ jobs:
strategy:
matrix:
- drupal_version: ['10.0', '10.1', '10.2', '10.3', '10.4', '11.0', '11.1']
+ drupal_version: ['10.5', '11.0', '11.1', '11.2']
module: ['bamboo_twig']
experimental: [false]
include:
- - drupal_version: '11.2'
+ - drupal_version: '11.3'
module: 'bamboo_twig'
experimental: true
@@ -41,11 +41,11 @@ jobs:
strategy:
matrix:
- drupal_version: ['10.0', '10.1', '10.2', '10.3', '10.4', '11.0', '11.1']
+ drupal_version: ['10.5', '11.0', '11.1', '11.2']
module: ['bamboo_twig']
experimental: [false]
include:
- - drupal_version: '11.2'
+ - drupal_version: '11.3'
module: 'bamboo_twig'
experimental: true
@@ -74,7 +74,7 @@ jobs:
strategy:
matrix:
- drupal_version: ['10.4']
+ drupal_version: ['10.5']
module: ['bamboo_twig']
steps:
diff --git a/.github/workflows/styles.yml b/.github/workflows/styles.yml
index c73ae00..2023d1b 100644
--- a/.github/workflows/styles.yml
+++ b/.github/workflows/styles.yml
@@ -9,7 +9,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
- php-version: '8.1'
+ php-version: '8.3'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: cs2pr, composer:v2
- uses: actions/checkout@v5
@@ -23,7 +23,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
- php-version: '8.1'
+ php-version: '8.3'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: cs2pr, composer:v2, phpmd
- uses: actions/checkout@v5
@@ -37,7 +37,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
- php-version: '8.1'
+ php-version: '8.3'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: cs2pr, composer:v2, phpcpd
- uses: actions/checkout@v5
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 396cd59..e85ceb6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -32,12 +32,13 @@ variables:
SKIP_ESLINT: '1'
# Opt in to testing current minor against max supported PHP version.
OPT_IN_TEST_MAX_PHP: '1'
- # Opt in to testing previous minor (Drupal 11.0.13) & next minor (Drupal 11.2-dev).
+ # Opt in to testing previous minor (Drupal 11.1.x)
OPT_IN_TEST_PREVIOUS_MINOR: '1'
+ # Opt in to testing next minor (Drupal 11.3.x).
OPT_IN_TEST_NEXT_MINOR: '1'
- # Opt in to testing $CORE_PREVIOUS_MAJOR (currently Drupal 10.4.6).
+ # Opt in to testing $CORE_PREVIOUS_MAJOR (Drupal 10.4.x).
OPT_IN_TEST_PREVIOUS_MAJOR: '1'
- # Opt in to testing $CORE_MAJOR_DEVELOPMENT (currently Drupal 12).
+ # Opt in to testing $CORE_MAJOR_DEVELOPMENT (Drupal 12).
OPT_IN_TEST_NEXT_MAJOR: '1'
# This module wants to strictly comply with Drupal's coding standards.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 771e765..41f7c68 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- ignore phpstan Call to internal function twig_date_converter - already adressed
+### Added
+- add official support of drupal 10.5
+- add official support of drupal 11.2
+- add 'datetimeplus' to cspell ignore wordlist
+
+### Removed
+- drop coverage of Drupal 10.0.x
+- drop coverage of Drupal 10.1.x
+- drop coverage of Drupal 10.2.x
+- drop coverage of Drupal 10.3.x
+- drop coverage of Drupal 10.4.x
+- remove legacy 'version_compare' from Tests suites
+
## [6.0.4] - 2025-05-15
### Removed
- drop support of Drupal 9.x
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3a0dce9..9aae4d4 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -33,7 +33,7 @@ globally on your environment:
Once run, you will be able to access to your fresh installed Drupal on `localhost::8888`.
- docker compose build --pull --build-arg BASE_IMAGE_TAG=10.4 drupal
+ docker compose build --pull --build-arg BASE_IMAGE_TAG=11.2 drupal
(get a coffee, this will take some time...)
docker compose up -d drupal
docker compose exec -u www-data drupal drush site-install standard --db-url="mysql://drupal:drupal@db/drupal" --site-name=Example -y
diff --git a/Dockerfile b/Dockerfile
index 3a25f4b..ac65765 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-ARG BASE_IMAGE_TAG=10.1
+ARG BASE_IMAGE_TAG=11.2
FROM wengerk/drupal-for-contrib:${BASE_IMAGE_TAG}
ARG BASE_IMAGE_TAG
diff --git a/bamboo_twig.info.yml b/bamboo_twig.info.yml
index a34e1c1..5aac640 100644
--- a/bamboo_twig.info.yml
+++ b/bamboo_twig.info.yml
@@ -2,4 +2,4 @@ name: Bamboo Twig
description: 'Several Twig extensions with some useful functions and filters that can improve development experience.'
package: Bamboo Twig
type: module
-core_version_requirement: ^10 || ^11
+core_version_requirement: ^10.5 || ^11
diff --git a/bamboo_twig_cacheable/bamboo_twig_cacheable.info.yml b/bamboo_twig_cacheable/bamboo_twig_cacheable.info.yml
index 7bcaf9f..6441c6b 100644
--- a/bamboo_twig_cacheable/bamboo_twig_cacheable.info.yml
+++ b/bamboo_twig_cacheable/bamboo_twig_cacheable.info.yml
@@ -2,7 +2,7 @@ name: Bamboo Twig - Cacheable
description: 'Several "Cacheable" Twig extensions.'
package: Bamboo Twig
type: module
-core_version_requirement: ^10 || ^11
+core_version_requirement: ^10.5 || ^11
dependencies:
- bamboo_twig:bamboo_twig
diff --git a/bamboo_twig_config/bamboo_twig_config.info.yml b/bamboo_twig_config/bamboo_twig_config.info.yml
index 3234f88..0a0cea3 100644
--- a/bamboo_twig_config/bamboo_twig_config.info.yml
+++ b/bamboo_twig_config/bamboo_twig_config.info.yml
@@ -2,7 +2,7 @@ name: Bamboo Twig - Config
description: 'Several "Config" Twig extensions.'
package: Bamboo Twig
type: module
-core_version_requirement: ^10 || ^11
+core_version_requirement: ^10.5 || ^11
dependencies:
- bamboo_twig:bamboo_twig
diff --git a/bamboo_twig_extensions/bamboo_twig_extensions.info.yml b/bamboo_twig_extensions/bamboo_twig_extensions.info.yml
index 7d218b8..f394648 100644
--- a/bamboo_twig_extensions/bamboo_twig_extensions.info.yml
+++ b/bamboo_twig_extensions/bamboo_twig_extensions.info.yml
@@ -2,7 +2,7 @@ name: Bamboo Twig - Extensions
description: 'Twig extensions (Text, Date & Array) from http://twig-extensions.readthedocs.io/en/latest/index.html.'
package: Bamboo Twig
type: module
-core_version_requirement: ^10 || ^11
+core_version_requirement: ^10.5 || ^11
dependencies:
- bamboo_twig:bamboo_twig
diff --git a/bamboo_twig_file/bamboo_twig_file.info.yml b/bamboo_twig_file/bamboo_twig_file.info.yml
index 7669a95..4cca324 100644
--- a/bamboo_twig_file/bamboo_twig_file.info.yml
+++ b/bamboo_twig_file/bamboo_twig_file.info.yml
@@ -2,7 +2,7 @@ name: Bamboo Twig - File
description: 'Several "File" Twig extensions.'
package: Bamboo Twig
type: module
-core_version_requirement: ^10 || ^11
+core_version_requirement: ^10.5 || ^11
dependencies:
- bamboo_twig:bamboo_twig
diff --git a/bamboo_twig_i18n/bamboo_twig_i18n.info.yml b/bamboo_twig_i18n/bamboo_twig_i18n.info.yml
index 24ed306..211c57c 100644
--- a/bamboo_twig_i18n/bamboo_twig_i18n.info.yml
+++ b/bamboo_twig_i18n/bamboo_twig_i18n.info.yml
@@ -2,7 +2,7 @@ name: Bamboo Twig - Internationalization
description: 'Several "i18n" Twig extensions.'
package: Bamboo Twig
type: module
-core_version_requirement: ^10 || ^11
+core_version_requirement: ^10.5 || ^11
dependencies:
- bamboo_twig:bamboo_twig
diff --git a/bamboo_twig_loader/bamboo_twig_loader.info.yml b/bamboo_twig_loader/bamboo_twig_loader.info.yml
index c7f3560..41915ad 100644
--- a/bamboo_twig_loader/bamboo_twig_loader.info.yml
+++ b/bamboo_twig_loader/bamboo_twig_loader.info.yml
@@ -2,7 +2,7 @@ name: Bamboo Twig - Loaders
description: 'Several "Loaders & Render" Twig extensions.'
package: Bamboo Twig
type: module
-core_version_requirement: ^10 || ^11
+core_version_requirement: ^10.5 || ^11
dependencies:
- bamboo_twig:bamboo_twig
diff --git a/bamboo_twig_path/bamboo_twig_path.info.yml b/bamboo_twig_path/bamboo_twig_path.info.yml
index 2d4b843..505bb09 100644
--- a/bamboo_twig_path/bamboo_twig_path.info.yml
+++ b/bamboo_twig_path/bamboo_twig_path.info.yml
@@ -2,7 +2,7 @@ name: Bamboo Twig - Path & Url
description: 'Several "Path & Url" Twig extensions.'
package: Bamboo Twig
type: module
-core_version_requirement: ^10 || ^11
+core_version_requirement: ^10.5 || ^11
dependencies:
- bamboo_twig:bamboo_twig
diff --git a/bamboo_twig_security/bamboo_twig_security.info.yml b/bamboo_twig_security/bamboo_twig_security.info.yml
index 4f903ba..d95eff8 100644
--- a/bamboo_twig_security/bamboo_twig_security.info.yml
+++ b/bamboo_twig_security/bamboo_twig_security.info.yml
@@ -2,7 +2,7 @@ name: Bamboo Twig - Security
description: 'Several "Security" Twig extensions.'
package: Bamboo Twig
type: module
-core_version_requirement: ^10 || ^11
+core_version_requirement: ^10.5 || ^11
dependencies:
- bamboo_twig:bamboo_twig
diff --git a/bamboo_twig_token/bamboo_twig_token.info.yml b/bamboo_twig_token/bamboo_twig_token.info.yml
index 6d4c89d..ad7a7da 100644
--- a/bamboo_twig_token/bamboo_twig_token.info.yml
+++ b/bamboo_twig_token/bamboo_twig_token.info.yml
@@ -2,7 +2,7 @@ name: Bamboo Twig - Token
description: 'Several "Token" Twig extensions.'
package: Bamboo Twig
type: module
-core_version_requirement: ^10 || ^11
+core_version_requirement: ^10.5 || ^11
dependencies:
- bamboo_twig:bamboo_twig
diff --git a/tests/modules/bamboo_twig_test/bamboo_twig_test.info.yml b/tests/modules/bamboo_twig_test/bamboo_twig_test.info.yml
index 77cf66b..66dc032 100644
--- a/tests/modules/bamboo_twig_test/bamboo_twig_test.info.yml
+++ b/tests/modules/bamboo_twig_test/bamboo_twig_test.info.yml
@@ -2,7 +2,7 @@ name: Bamboo Twig test
description: Support module for Bamboo Twig testing.
package: Testing
type: module
-core_version_requirement: ^10 || ^11
+core_version_requirement: ^10.5 || ^11
dependencies:
- drupal:bamboo_twig
diff --git a/tests/src/Functional/BambooTwigRenderTest.php b/tests/src/Functional/BambooTwigRenderTest.php
index 2bd2540..f889725 100644
--- a/tests/src/Functional/BambooTwigRenderTest.php
+++ b/tests/src/Functional/BambooTwigRenderTest.php
@@ -455,33 +455,11 @@ public function testMenu() {
$this->drupalGet('/bamboo-twig-render');
$this->assertSession()->elementExists('css', '.test-render div.render-menu-all');
$this->assertElementCount('ul', 9, '.test-render div.render-menu-all');
-
- // Since Drupal 10.2.x the default Drupal distribution have X menu items.
- if (version_compare(\Drupal::VERSION, '10.2', '>=')) {
- $this->assertElementCount('li', 24, '.test-render div.render-menu-all');
- }
- // Since Drupal 10.1.x the default Drupal distribution have X menu items.
- elseif (version_compare(\Drupal::VERSION, '10.1', '>=')) {
- $this->assertElementCount('li', 29, '.test-render div.render-menu-all');
- }
- else {
- $this->assertElementCount('li', 27, '.test-render div.render-menu-all');
- }
+ $this->assertElementCount('li', 24, '.test-render div.render-menu-all');
$this->assertSession()->elementExists('css', '.test-render div.render-menu-level');
$this->assertElementCount('ul', 8, '.test-render div.render-menu-level');
-
- // Since Drupal 10.2.x the default Drupal distribution have X menu items.
- if (version_compare(\Drupal::VERSION, '10.2', '>=')) {
- $this->assertElementCount('li', 23, '.test-render div.render-menu-level');
- }
- // Since Drupal 10.1.x the default Drupal distribution have X menu items.
- elseif (version_compare(\Drupal::VERSION, '10.1', '>=')) {
- $this->assertElementCount('li', 28, '.test-render div.render-menu-level');
- }
- else {
- $this->assertElementCount('li', 26, '.test-render div.render-menu-level');
- }
+ $this->assertElementCount('li', 23, '.test-render div.render-menu-level');
$this->assertSession()->elementExists('css', '.test-render div.render-menu-depth');
$this->assertElementCount('ul', 2, '.test-render div.render-menu-depth');
diff --git a/tests/src/Kernel/BambooTwigSecurityTest.php b/tests/src/Kernel/BambooTwigSecurityTest.php
index d696b1c..32d5b86 100644
--- a/tests/src/Kernel/BambooTwigSecurityTest.php
+++ b/tests/src/Kernel/BambooTwigSecurityTest.php
@@ -46,12 +46,6 @@ protected function setUp(): void {
$this->installEntitySchema('user');
- // Since Drupal 10.2.0 installing the table sequences with the
- // method KernelTestBase::installSchema() is deprecated.
- if (version_compare(\Drupal::VERSION, '10.2.0', '<')) {
- $this->installSchema('system', ['sequences']);
- }
-
$this->entityTypeManager = $this->container->get('entity_type.manager');
$this->securityExtension = $this->container->get('bamboo_twig_security.twig.security');
diff --git a/tests/src/Kernel/Render/ImageTest.php b/tests/src/Kernel/Render/ImageTest.php
index acb24b7..51aa8ab 100644
--- a/tests/src/Kernel/Render/ImageTest.php
+++ b/tests/src/Kernel/Render/ImageTest.php
@@ -54,13 +54,6 @@ protected function setUp(): void {
$this->installEntitySchema('user');
$this->installEntitySchema('file');
$this->installSchema('file', 'file_usage');
-
- // Since Drupal 10.2.0 installing the table sequences with the
- // method KernelTestBase::installSchema() is deprecated.
- if (version_compare(\Drupal::VERSION, '10.2.0', '<')) {
- $this->installSchema('system', ['sequences']);
- }
-
$this->installEntitySchema('media');
$this->installConfig(['field', 'system', 'image', 'file', 'media']);
@@ -142,18 +135,7 @@ public function testRenderImageFile() {
$markup = $this->renderer->renderRoot($renderer);
$this->assertInstanceOf(Markup::class, $markup);
-
- // Since Drupal 10.3 the image styles are rendered as avif.
- if (version_compare(\Drupal::VERSION, '11.2', '>=')) {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
- // Since Drupal 10.3 the image styles are rendered as webp.
- elseif (version_compare(\Drupal::VERSION, '10.3', '>=')) {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
- else {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
+ $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
// Ensure {{ bamboo_render_image(1, 'thumbnail', '') }}.
$renderer = $this->renderExtension->renderImage($file->id(), 'thumbnail', '');
@@ -166,18 +148,7 @@ public function testRenderImageFile() {
$markup = $this->renderer->renderRoot($renderer);
$this->assertInstanceOf(Markup::class, $markup);
-
- // Since Drupal 10.3 the image styles are rendered as avif.
- if (version_compare(\Drupal::VERSION, '11.2', '>=')) {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
- // Since Drupal 10.3 the image styles are rendered as webp.
- elseif (version_compare(\Drupal::VERSION, '10.3', '>=')) {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
- else {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
+ $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
// Ensure {{ bamboo_render_image(1, 'thumbnail', 'Dignissim ... primis') }}.
$renderer = $this->renderExtension->renderImage($file->id(), 'thumbnail', 'Dignissim dui dolor ipsum sapien habitant primis');
@@ -190,18 +161,7 @@ public function testRenderImageFile() {
$markup = $this->renderer->renderRoot($renderer);
$this->assertInstanceOf(Markup::class, $markup);
-
- // Since Drupal 10.3 the image styles are rendered as avif.
- if (version_compare(\Drupal::VERSION, '11.2', '>=')) {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
- // Since Drupal 10.3 the image styles are rendered as webp.
- elseif (version_compare(\Drupal::VERSION, '10.3', '>=')) {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
- else {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
+ $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
}
/**
@@ -228,18 +188,7 @@ public function testRenderImageMedia() {
$markup = $this->renderer->renderRoot($renderer);
$this->assertInstanceOf(Markup::class, $markup);
-
- // Since Drupal 10.3 the image styles are rendered as avif.
- if (version_compare(\Drupal::VERSION, '11.2', '>=')) {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
- // Since Drupal 10.3 the image styles are rendered as webp.
- elseif (version_compare(\Drupal::VERSION, '10.3', '>=')) {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
- else {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
+ $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
// Ensure {{ bamboo_render_image(1, 'thumbnail', '') }}.
$renderer = $this->renderExtension->renderImage($media->field_media_image->target_id, 'thumbnail', '');
@@ -252,18 +201,7 @@ public function testRenderImageMedia() {
$markup = $this->renderer->renderRoot($renderer);
$this->assertInstanceOf(Markup::class, $markup);
-
- // Since Drupal 10.3 the image styles are rendered as avif.
- if (version_compare(\Drupal::VERSION, '11.2', '>=')) {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
- // Since Drupal 10.3 the image styles are rendered as webp.
- elseif (version_compare(\Drupal::VERSION, '10.3', '>=')) {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
- else {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
+ $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
// Ensure {{ bamboo_render_image(1, 'thumbnail', 'Dignissim ... primis') }}.
$renderer = $this->renderExtension->renderImage($media->field_media_image->target_id, 'thumbnail', 'Dignissim dui dolor ipsum sapien habitant primis');
@@ -276,18 +214,7 @@ public function testRenderImageMedia() {
$markup = $this->renderer->renderRoot($renderer);
$this->assertInstanceOf(Markup::class, $markup);
-
- // Since Drupal 10.3 the image styles are rendered as avif.
- if (version_compare(\Drupal::VERSION, '11.2', '>=')) {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
- // Since Drupal 10.3 the image styles are rendered as webp.
- elseif (version_compare(\Drupal::VERSION, '10.3', '>=')) {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
- else {
- $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
- }
+ $this->assertMatchesRegularExpression('/^
/', $markup->__toString());
}
}