Skip to content

Commit 5a6f299

Browse files
committed
add official stable support for drupal 10.3 & 10.4
1 parent e734ee2 commit 5a6f299

File tree

5 files changed

+58
-28
lines changed

5 files changed

+58
-28
lines changed

.github/workflows/ci.yml

+3-15
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,10 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
drupal_version: ['9.5', '10.0', '10.1', '10.2']
14+
drupal_version: ['9.5', '10.3', '10.4']
1515
module: ['editor_advanced_image']
1616
experimental: [ false ]
1717
include:
18-
- drupal_version: '10.3'
19-
module: 'editor_advanced_image'
20-
experimental: true
21-
- drupal_version: '10.4'
22-
module: 'editor_advanced_image'
23-
experimental: true
2418
- drupal_version: '10.5'
2519
module: 'editor_advanced_image'
2620
experimental: true
@@ -46,16 +40,10 @@ jobs:
4640

4741
strategy:
4842
matrix:
49-
drupal_version: ['9.5', '10.0', '10.1', '10.2']
43+
drupal_version: ['9.5', '10.3', '10.4']
5044
module: ['editor_advanced_image']
5145
experimental: [ false ]
5246
include:
53-
- drupal_version: '10.3'
54-
module: 'editor_advanced_image'
55-
experimental: true
56-
- drupal_version: '10.4'
57-
module: 'editor_advanced_image'
58-
experimental: true
5947
- drupal_version: '10.5'
6048
module: 'editor_advanced_image'
6149
experimental: true
@@ -85,7 +73,7 @@ jobs:
8573

8674
strategy:
8775
matrix:
88-
drupal_version: ['9.5']
76+
drupal_version: ['10.3']
8977
module: ['editor_advanced_image']
9078
experimental: [ true ]
9179

.gitlab-ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ include:
3030
################
3131
variables:
3232
# The 2.x branch of the module should run on 9.5 to maximum 10.2 but not upper.
33-
CORE_PREVIOUS_STABLE: '10.0'
34-
CORE_STABLE: '10.1'
35-
CORE_NEXT_MINOR: '10.2'
36-
CORE_SECURITY_PREVIOUS_MINOR: '10.1'
33+
CORE_PREVIOUS_STABLE: '10.3'
34+
CORE_STABLE: '10.4'
35+
CORE_NEXT_MINOR: '10.5'
36+
CORE_SECURITY_PREVIOUS_MINOR: '10.3'
3737
# The 2.x branch of the module requires PHP >=8.1, rather than core's >=7.4.
3838
CORE_PREVIOUS_PHP_MIN: '8.1'
3939
CORE_PHP_MAX: '8.2'
@@ -46,8 +46,8 @@ variables:
4646
OPT_IN_TEST_PREVIOUS_MINOR: '1'
4747
# Opt-in to testing previous Major (Drupal 9.5.x).
4848
OPT_IN_TEST_PREVIOUS_MAJOR: '1'
49-
# Opt-int of testing next Minor (Drupal 10.x).
50-
OPT_IN_TEST_NEXT_MINOR: '1'
49+
# Opt-int of testing next Minor (Drupal 10.5).
50+
OPT_IN_TEST_NEXT_MINOR: '0'
5151
# Opt-out of testing next Major (Drupal 11.x).
5252
OPT_IN_TEST_NEXT_MAJOR: '0'
5353

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88
### Added
99
- fix support from 9.5.x to 10.2 maximum
10+
- add official stable support for drupal 10.3
11+
- add official stable support for drupal 10.4
1012

1113
### Removed
1214
- remove legacy version annotation on docker-compose.yml

editor_advanced_image.info.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
name: 'Editor Advanced Image'
22
type: module
33
description: 'Enhances the inline-image Dialog in D8 CKEditor.'
4-
core_version_requirement: ^9.5 || ^10
4+
core_version_requirement: ^9.5 || ^10.3
55
package: CKEditor
66

77
dependencies:
88
- drupal:editor
9+
10+
test_dependencies:
11+
- drupal:ckeditor

tests/src/Kernel/CKEditor4To5Upgrade/UpgradePathTest.php

+43-6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,36 @@
99
use Drupal\filter\Entity\FilterFormat;
1010
use Drupal\Tests\ckeditor5\Kernel\SmartDefaultSettingsTest;
1111

12+
// phpcs:ignoreFile
13+
14+
if (version_compare(\Drupal::VERSION, '10.3', '<')) {
15+
class CrossCompatibleUpgradePath extends SmartDefaultSettingsTest {
16+
/**
17+
* {@inheritdoc}
18+
*/
19+
public function provider() {
20+
return static::dataProvider();
21+
}
22+
23+
public function parentProvider() {
24+
return parent::provider();
25+
}
26+
}
27+
} else {
28+
class CrossCompatibleUpgradePath extends SmartDefaultSettingsTest {
29+
/**
30+
* {@inheritdoc}
31+
*/
32+
public static function provider() {
33+
return static::dataProvider();
34+
}
35+
36+
public function parentProvider() {
37+
return parent::provider();
38+
}
39+
}
40+
}
41+
1242
/**
1343
* @covers \Drupal\editor_advanced_image\Plugin\CKEditor4To5Upgrade\EditorAdvancedImage
1444
*
@@ -21,7 +51,7 @@
2151
*
2252
* @requires module ckeditor5
2353
*/
24-
class UpgradePathTest extends SmartDefaultSettingsTest {
54+
class UpgradePathTest extends CrossCompatibleUpgradePath {
2555

2656
/**
2757
* {@inheritdoc}
@@ -34,12 +64,16 @@ class UpgradePathTest extends SmartDefaultSettingsTest {
3464
* {@inheritdoc}
3565
*/
3666
protected function setUp(): void {
37-
parent::setUp();
38-
3967
if (version_compare(\Drupal::VERSION, '10', '<')) {
4068
$this->markTestSkipped('Upgrade path will only run properly on Drupal 10+ because of config sorting.');
4169
}
4270

71+
if (version_compare(\Drupal::VERSION, '10.2', '>')) {
72+
$this->markTestSkipped('Cannot run CKEditor4 upgrade path to CKEditor 5 on Drupal later than 10.2.');
73+
}
74+
75+
parent::setUp();
76+
4377
// Create test FilterFormat config entities: one per option to test in
4478
// isolation, plus one to test with the default configuration (class attr
4579
// enabled), plus one with ALL attributes enabled but with additional
@@ -133,9 +167,12 @@ protected function setUp(): void {
133167
}
134168

135169
/**
136-
* {@inheritdoc}
170+
* The actual data provider implementation.
171+
*
172+
* @return \Generator
173+
* The test cases.
137174
*/
138-
public function provider() {
175+
protected function dataProvider() {
139176
$expected_ckeditor5_toolbar = [
140177
'items' => [
141178
'bold',
@@ -295,7 +332,7 @@ public function provider() {
295332
];
296333
sort($full_html_configuration['enabled_attributes']);
297334

298-
foreach (parent::provider() as $label => $case) {
335+
foreach ($this->parentProvider() as $label => $case) {
299336
// The `editor_advanced_image_image` plugin settings will appear for every
300337
// upgraded text editor while editor_advanced_image is installed, as long
301338
// as it has the `DrupalImage` button enabled in CKEditor 4.

0 commit comments

Comments
 (0)