Skip to content

Commit 7183d0f

Browse files
authored
Merge pull request #29 from antistatique/feature/phpunit-fix
fix phpunit Drupal 9.5 Schema errors for views.view.profiles
2 parents 736901e + 5d856f2 commit 7183d0f

14 files changed

+48
-32
lines changed

.cspell-project-words.txt

+1
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ wapmorgan
4242
wengerk
4343
ZRNRFI
4444
ZRNRFP
45+
multilanguage

.github/workflows/ci.yml

+25-15
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,29 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
drupal_version: ['9.5', '10.3', '10.4']
15+
drupal_version: ['10.3', '10.4', '11.0', '11.1']
1616
module: ['commerce_trustedshops']
1717
experimental: [ false ]
18-
# include:
19-
# - drupal_version: '11.0'
20-
# module: 'commerce_trustedshops'
21-
# experimental: true
18+
include:
19+
- drupal_version: '10.5'
20+
module: 'commerce_trustedshops'
21+
experimental: true
22+
- drupal_version: '11.2'
23+
module: 'commerce_trustedshops'
24+
experimental: true
2225

2326
steps:
2427
- uses: actions/checkout@v4
2528
- run: docker compose -f docker-compose.yml pull --include-deps drupal
2629
- name: Build the docker compose stack
2730
run: docker compose -f docker-compose.yml build --pull --build-arg BASE_IMAGE_TAG=${{ matrix.drupal_version }} drupal
2831
continue-on-error: ${{ matrix.experimental }}
32+
- name: Up a persistent Docker Container
33+
run: docker compose -f docker-compose.yml up -d drupal
34+
- name: wait on Docker to be ready, especially Apache that takes many seconds to be up
35+
run: docker compose exec -T drupal wait-for-it drupal:80 -t 60
36+
- name: wait on Docker to be ready, especially MariaDB that takes many seconds to be up
37+
run: docker compose exec -T drupal wait-for-it db:3306 -t 60
2938
- name: Run unit tests
3039
run: docker compose -f docker-compose.yml run -u www-data drupal phpunit --no-coverage --group=${{ matrix.module }} --exclude-group=${{ matrix.module }}_functional --configuration=/var/www/html/phpunit.xml
3140
continue-on-error: ${{ matrix.experimental }}
@@ -37,21 +46,24 @@ jobs:
3746

3847
strategy:
3948
matrix:
40-
drupal_version: ['9.5', '10.3', '10.4']
49+
drupal_version: ['10.3', '10.4', '11.0', '11.1']
4150
module: [ 'commerce_trustedshops' ]
42-
experimental: [ false ]
43-
# include:
44-
# - drupal_version: '11.0'
45-
# module: 'commerce_trustedshops'
46-
# experimental: true
51+
experimental: [false]
52+
include:
53+
- drupal_version: '10.5'
54+
module: 'commerce_trustedshops'
55+
experimental: true
56+
- drupal_version: '11.2'
57+
module: 'commerce_trustedshops'
58+
experimental: true
4759

4860
steps:
4961
- uses: actions/checkout@v4
5062
- run: docker compose -f docker-compose.yml pull --include-deps drupal
5163
- name: Build the docker compose stack
5264
run: docker compose -f docker-compose.yml build --pull --build-arg BASE_IMAGE_TAG=${{ matrix.drupal_version }} drupal
5365
continue-on-error: ${{ matrix.experimental }}
54-
- name: Up a persistant Docker Container
66+
- name: Up a persistent Docker Container
5567
run: docker compose -f docker-compose.yml up -d drupal
5668
- name: wait on Docker to be ready, especially Apache that takes many seconds to be up
5769
run: docker compose exec -T drupal wait-for-it drupal:80 -t 60
@@ -71,7 +83,7 @@ jobs:
7183

7284
strategy:
7385
matrix:
74-
drupal_version: ['10.3']
86+
drupal_version: ['10.4']
7587
module: ['commerce_trustedshops']
7688

7789
steps:
@@ -89,8 +101,6 @@ jobs:
89101
run: docker compose -f docker-compose.yml exec -T -u www-data drupal drush site-install standard --db-url="mysql://drupal:drupal@db/drupal" -y
90102
- name: Enable upgrade status
91103
run: docker compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush en upgrade_status -y
92-
- name: Disable incompatible module
93-
run: docker compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush pmu page_cache -y
94104
- name: Enable the module
95105
run: docker compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush en ${{ matrix.module }} -y
96106
- name: Run upgrade status

.gitlab-ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ variables:
3232
SKIP_ESLINT: '1'
3333
# Opt in to testing current minor against max supported PHP version.
3434
OPT_IN_TEST_MAX_PHP: '1'
35-
# Opt in to testing previous & next minor (Drupal 10.0.x and 10.3.x).
35+
# Opt in to testing previous minor (Drupal 11.0.x).
3636
OPT_IN_TEST_PREVIOUS_MINOR: '1'
37+
# Opt in to testing next minor (Drupal 11.2.x).
3738
OPT_IN_TEST_NEXT_MINOR: '1'
3839

39-
# Opt out to testing $CORE_PREVIOUS_MAJOR (currently Drupal 9.5).
40-
# Uncomment to opt in.
41-
# OPT_IN_TEST_PREVIOUS_MAJOR: '1'
40+
# Opt in to testing $CORE_PREVIOUS_MAJOR (currently Drupal 10.4).
41+
OPT_IN_TEST_PREVIOUS_MAJOR: '1'
4242

4343
# The 3.x branch of the module requires PHP >=8.1, rather than core's >=7.4.
4444
CORE_PREVIOUS_PHP_MIN: '8.1'
4545

46-
# Opt out to testing $CORE_MAJOR_DEVELOPMENT (currently Drupal 11).
47-
# OPT_IN_TEST_NEXT_MAJOR: '1'
46+
# Opt in to testing $CORE_MAJOR_DEVELOPMENT (currently Drupal 11).
47+
OPT_IN_TEST_NEXT_MAJOR: '1'
4848

4949
# This module wants to strictly comply with Drupal's coding standards.
5050
phpcs:

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Added
9+
- add official support of drupal 10.4
10+
- add official support of drupal 11.1
11+
812
### Security
913
- update antistatique/trustedshops-php-sdk (1.0.0 => 1.1.0)
1014

@@ -16,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1620

1721
### Removed
1822
- drop testing on Drupal 10.0, 10.1 & 10.2
23+
- drop support of Drupal 9.5
1924

2025
## [3.0.1] - 2024-06-25
2126
### Removed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ globally on your environment:
3333

3434
Once run, you will be able to access to your fresh installed Drupal on `localhost::8888`.
3535

36-
docker compose build --pull --build-arg BASE_IMAGE_TAG=10.1 drupal
36+
docker compose build --pull --build-arg BASE_IMAGE_TAG=10.4 drupal
3737
(get a coffee, this will take some time...)
3838
docker compose up -d drupal
3939
docker compose exec -u www-data drupal drush site-install standard --db-url="mysql://drupal:drupal@db/drupal" -y

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG BASE_IMAGE_TAG=10.1
1+
ARG BASE_IMAGE_TAG=10.4
22
FROM wengerk/drupal-for-contrib:${BASE_IMAGE_TAG}
33

44
# Drupal Commerce 2.20+ requires bcmath extensions.
@@ -10,7 +10,7 @@ ENV COMPOSER_MEMORY_LIMIT=-1
1010
ENV SYMFONY_DEPRECATIONS_HELPER=disabled
1111

1212
# Install Drupal Commerce as required by the module
13-
RUN composer require drupal/commerce:^2.39 'drupal/inline_entity_form:^1.0@RC'
13+
RUN composer require "drupal/commerce:^2.39||^3.0" 'drupal/inline_entity_form:^1.0@RC||^3.0@RC'
1414

1515
# Install the TrustedShops PHP SDK as required by the module
1616
RUN composer require antistatique/trustedshops-php-sdk:^1.0.0

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Commerce TrustedShops is available for both Drupal 8 & Drupal 9 & Drupal 10 !
4848
| 8.8.x | 2.x | 2.8 |
4949
| 9.x | 2.x | 2.33 |
5050
| 10.x | 3.x | 2.33 |
51+
| 11.x | 3.x | 3.0 |
5152

5253
## Dependencies
5354

commerce_trustedshops.info.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Commerce TrustedShops
22
description: 'Provides Commerce integration for TrustedShops.'
33
package: 'Commerce (contrib)'
44
type: module
5-
core_version_requirement: ^9.5 || ^10 || ^11
5+
core_version_requirement: ^10 || ^11
66

77
dependencies:
88
- drupal:commerce

tests/src/Functional/InviteReviewMultilanguageTest.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,14 @@ class InviteReviewMultilanguageTest extends OrderBrowserTestBase {
3939
* @var array
4040
*/
4141
protected static $modules = [
42-
'locale',
4342
'language',
4443
'commerce_trustedshops',
4544
];
4645

4746
/**
4847
* {@inheritdoc}
4948
*/
50-
protected $defaultTheme = 'starterkit_theme';
49+
protected $defaultTheme = 'stark';
5150

5251
/**
5352
* {@inheritdoc}

tests/src/Functional/InviteReviewTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class InviteReviewTest extends OrderBrowserTestBase {
4141
/**
4242
* {@inheritdoc}
4343
*/
44-
protected $defaultTheme = 'starterkit_theme';
44+
protected $defaultTheme = 'stark';
4545

4646
/**
4747
* {@inheritdoc}

tests/src/Functional/ShopAdminTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ShopAdminTest extends CommerceBrowserTestBase {
2727
/**
2828
* {@inheritdoc}
2929
*/
30-
protected $defaultTheme = 'starterkit_theme';
30+
protected $defaultTheme = 'stark';
3131

3232
/**
3333
* {@inheritdoc}

tests/src/Kernel/DefaultShopResolverTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function testResolve($store_id, LanguageInterface $language, $expected_sh
130130
* @return array
131131
* An array of each store/language variation.
132132
*/
133-
public function providerDefaultShopAndLanguage() {
133+
public static function providerDefaultShopAndLanguage() {
134134
return [
135135
[1, new Language(['id' => 'en']), 1,
136136
'R9H9J8ETR1PBFYZ1564ODXCII6EU9ZRNRFI8SC',

tests/src/Unit/Resolver/ChainOrderLanguageResolverTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function setUp(): void {
3636
*
3737
* @covers ::addResolver
3838
* @covers ::getResolvers
39-
* @covers ::resolve.
39+
* @covers ::resolve
4040
*/
4141
public function testResolver() {
4242
$container = new ContainerBuilder();

tests/src/Unit/Resolver/ChainShopResolverTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function setUp(): void {
3434
*
3535
* @covers ::addResolver
3636
* @covers ::getResolvers
37-
* @covers ::resolve.
37+
* @covers ::resolve
3838
*/
3939
public function testResolver() {
4040
$container = new ContainerBuilder();

0 commit comments

Comments
 (0)