Skip to content

Commit 62714ba

Browse files
authored
[TASK] Add TYPO3 14 compatibility (#62)
Allow TYPO3 14 in composer.json and adapt the workflow and testing scripts to cover the updated core and PHP matrix. This keeps automated checks compatible with the current TYPO3 testing framework setup.
1 parent fed8c2f commit 62714ba

6 files changed

Lines changed: 52 additions & 24 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,33 @@ jobs:
3232
php: '8.2'
3333
- TYPO3: '11'
3434
php: '8.3'
35-
# TYPO3 12: PHP 8.1 - 8.3
35+
# TYPO3 12: PHP 8.1 - 8.4
3636
- TYPO3: '12'
3737
php: '8.1'
3838
- TYPO3: '12'
3939
php: '8.2'
4040
- TYPO3: '12'
4141
php: '8.3'
42-
# TYPO3 13: PHP 8.2 - 8.3
42+
- TYPO3: '12'
43+
php: '8.4'
44+
# TYPO3 13: PHP 8.2 - 8.5
4345
- TYPO3: '13'
4446
php: '8.2'
4547
- TYPO3: '13'
4648
php: '8.3'
49+
- TYPO3: '13'
50+
php: '8.4'
51+
- TYPO3: '13'
52+
php: '8.5'
53+
# TYPO3 14: PHP 8.2 - 8.5
54+
- TYPO3: '14'
55+
php: '8.2'
56+
- TYPO3: '14'
57+
php: '8.3'
58+
- TYPO3: '14'
59+
php: '8.4'
60+
- TYPO3: '14'
61+
php: '8.5'
4762
steps:
4863
- name: Checkout repository
4964
uses: actions/checkout@v3

Build/Scripts/runTests.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Options:
5858
- phpstan: phpstan analyze
5959
- unit (default): PHP unit tests
6060
61-
-t <10|11|12|13>
61+
-t <10|11|12|13|14>
6262
Only with -s composerInstall|acceptance|functional
6363
TYPO3 core major version the extension is embedded in for testing.
6464
@@ -69,7 +69,7 @@ Options:
6969
- postgres: use postgres
7070
- sqlite: use sqlite
7171
72-
-p <7.2|7.3|7.4|8.0|8.1|8.2|8.3>
72+
-p <7.2|7.3|7.4|8.0|8.1|8.2|8.3|8.4|8.5>
7373
Specifies the PHP minor version to be used
7474
- 7.4 (default): use PHP 7.4
7575
@@ -163,7 +163,7 @@ while getopts ":s:d:p:e:t:xy:nhuv" OPT; do
163163
;;
164164
p)
165165
PHP_VERSION=${OPTARG}
166-
if ! [[ ${PHP_VERSION} =~ ^(7.2|7.3|7.4|8.0|8.1|8.2|8.3)$ ]]; then
166+
if ! [[ ${PHP_VERSION} =~ ^(7.2|7.3|7.4|8.0|8.1|8.2|8.3|8.4|8.5)$ ]]; then
167167
INVALID_OPTIONS+=("${OPTARG}")
168168
fi
169169
;;
@@ -299,10 +299,10 @@ case ${TEST_SUITE} in
299299
docker compose down
300300
;;
301301
update)
302-
# pull typo3/core-testing-*:latest versions of those ones that exist locally
303-
docker images typo3/core-testing-*:latest --format "{{.Repository}}:latest" | xargs -I {} docker pull {}
302+
# pull ghcr.io/typo3/core-testing-*:latest versions of those ones that exist locally
303+
docker images ghcr.io/typo3/core-testing-*:latest --format "{{.Repository}}:latest" | xargs -I {} docker pull {}
304304
# remove "dangling" typo3/core-testing-* images (those tagged as <none>)
305-
docker images typo3/core-testing-* --filter "dangling=true" --format "{{.ID}}" | xargs -I {} docker rmi {}
305+
docker images ghcr.io/typo3/core-testing-* --filter "dangling=true" --format "{{.ID}}" | xargs -I {} docker rmi {}
306306
;;
307307
*)
308308
echo "Invalid -s option argument ${TEST_SUITE}" >&2

Build/testing-docker/docker-compose.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
- /var/lib/postgresql/data:rw,noexec,nosuid
2222

2323
web:
24-
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
24+
image: ghcr.io/typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
2525
user: "${HOST_UID}"
2626
stop_grace_period: 1s
2727
volumes:
@@ -46,7 +46,7 @@ services:
4646
"
4747
4848
acceptance_backend_mariadb10:
49-
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
49+
image: ghcr.io/typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
5050
user: "${HOST_UID}"
5151
links:
5252
- mariadb10
@@ -89,7 +89,7 @@ services:
8989
"
9090
9191
cgl:
92-
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
92+
image: ghcr.io/typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
9393
user: "${HOST_UID}"
9494
volumes:
9595
- ${CORE_ROOT}:${CORE_ROOT}
@@ -125,7 +125,7 @@ services:
125125
"
126126
127127
composer_install:
128-
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
128+
image: ghcr.io/typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
129129
user: "${HOST_UID}"
130130
volumes:
131131
- ${CORE_ROOT}:${CORE_ROOT}
@@ -139,7 +139,13 @@ services:
139139
set -x
140140
fi
141141
php -v | grep '^PHP';
142-
if [ ${TYPO3} -eq 11 ]; then
142+
if [ ${TYPO3} -eq 13 ]; then
143+
composer clear-cache
144+
composer require typo3/cms-core:^13.4 typo3/testing-framework:^8 --dev -W --no-progress --no-interaction
145+
elif [ ${TYPO3} -eq 12 ]; then
146+
composer clear-cache
147+
composer require typo3/cms-core:^12.4 --dev -W --no-progress --no-interaction
148+
elif [ ${TYPO3} -eq 11 ]; then
143149
composer clear-cache
144150
composer require typo3/cms-core:^11.5 --dev -W --no-progress --no-interaction
145151
elif [ ${TYPO3} -eq 10 ]; then
@@ -148,12 +154,12 @@ services:
148154
composer prepare-tests-10
149155
else
150156
composer clear-cache
151-
composer require typo3/cms-core:^12.4 --dev -W --no-progress --no-interaction
157+
composer require typo3/cms-core:^14.2 typo3/testing-framework:^9 --dev -W --no-progress --no-interaction
152158
fi
153159
"
154160
155161
composer_validate:
156-
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
162+
image: ghcr.io/typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
157163
user: "${HOST_UID}"
158164
volumes:
159165
- ${CORE_ROOT}:${CORE_ROOT}
@@ -171,7 +177,7 @@ services:
171177
"
172178
173179
functional_mariadb10:
174-
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
180+
image: ghcr.io/typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
175181
user: "${HOST_UID}"
176182
links:
177183
- mariadb10
@@ -210,7 +216,7 @@ services:
210216
"
211217
212218
functional_postgres10:
213-
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
219+
image: ghcr.io/typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
214220
user: "${HOST_UID}"
215221
links:
216222
- postgres10
@@ -250,7 +256,7 @@ services:
250256
"
251257
252258
functional_sqlite:
253-
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
259+
image: ghcr.io/typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
254260
user: "${HOST_UID}"
255261
volumes:
256262
- ${CORE_ROOT}:${CORE_ROOT}
@@ -281,7 +287,7 @@ services:
281287
"
282288
283289
lint:
284-
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
290+
image: ghcr.io/typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
285291
user: "${HOST_UID}"
286292
volumes:
287293
- ${CORE_ROOT}:${CORE_ROOT}
@@ -298,7 +304,7 @@ services:
298304
"
299305
300306
phpstan:
301-
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
307+
image: ghcr.io/typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
302308
user: "${HOST_UID}"
303309
volumes:
304310
- ${CORE_ROOT}:${CORE_ROOT}
@@ -316,7 +322,7 @@ services:
316322
"
317323
318324
unit:
319-
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
325+
image: ghcr.io/typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
320326
user: "${HOST_UID}"
321327
volumes:
322328
- ${CORE_ROOT}:${CORE_ROOT}

Classes/Command/ExtensionCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ protected function getMajorVersion(string $versionConstraint): int
160160
{
161161
return (int)preg_replace_callback(
162162
'/^\^([0-9]{1,2}).*$/',
163-
static function ($matches) { return $matches[1]; },
163+
static function ($matches) {
164+
return $matches[1];
165+
},
164166
$versionConstraint
165167
);
166168
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You can also download the extension from the
1515
[TYPO3 Extension Repository](https://extensions.typo3.org/extension/make/)
1616
and activate it in the Extension Manager of your TYPO3 installation.
1717

18-
Note: This extension is compatible with TYPO3 v10, v11, v12 and v13 and should
18+
Note: This extension is compatible with TYPO3 v10, v11, v12, v13 and v14 and should
1919
only be used in development context. So please make sure it is excluded
2020
for production releases.
2121

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
}
1818
],
1919
"require": {
20-
"typo3/cms-core": "^10.0 || ^11.0 || ^12.0 || ^13.0"
20+
"typo3/cms-core": "^10.0 || ^11.0 || ^12.0 || ^13.0 || ^14.0"
2121
},
2222
"require-dev": {
2323
"phpstan/phpstan": "^1.4",
24+
"phpunit/phpunit": "^8 || ^9 || ^10 || ^11",
2425
"typo3/cms-core": "^11.5",
2526
"typo3/coding-standards": "^0.5",
2627
"typo3/tailor": "^1.4",
@@ -33,6 +34,10 @@
3334
"allow-plugins": {
3435
"typo3/class-alias-loader": true,
3536
"typo3/cms-composer-installers": true
37+
},
38+
"audit": {
39+
"block-insecure": false,
40+
"block-abandoned": false
3641
}
3742
},
3843
"extra": {

0 commit comments

Comments
 (0)