Skip to content

Commit a26f27a

Browse files
authored
Merge pull request #159 from sitegeist/158-typo3-13-support
TYPO3 13.2 support
2 parents 6d6b39c + 96439ad commit a26f27a

File tree

67 files changed

+512
-1114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+512
-1114
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
terUpload:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313
- uses: tomasnorre/typo3-upload-ter@v2
1414
with:
1515
api-token: ${{ secrets.TYPO3_API_TOKEN }}

.github/workflows/tests.yml

+40-22
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,25 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
-
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
12+
13+
-
14+
name: Set up Docker Compose
15+
run: |
16+
docker-compose --version || {
17+
echo "Docker Compose not found, installing..."
18+
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
19+
sudo chmod +x /usr/local/bin/docker-compose
20+
docker-compose --version
21+
}
1222
1323
-
1424
name: Validate composer.json
1525
run: Build/Scripts/runTests.sh -s composerValidate
1626

1727
-
1828
name: Cache composer dependencies
19-
uses: actions/cache@v3
29+
uses: actions/cache@v4
2030
with:
2131
path: ~/.composer/cache
2232
key: composer
@@ -40,27 +50,31 @@ jobs:
4050
strategy:
4151
max-parallel: 2
4252
matrix:
43-
php-versions: ['8.2', '8.1', '8.0']
44-
typo3-versions: [12, 11]
45-
exclude:
46-
- php-versions: '8.0'
47-
typo3-versions: 12
48-
include:
49-
- php-versions: '7.4'
50-
typo3-versions: 11
53+
php-versions: ['8.3', '8.2']
54+
typo3-versions: [13, 12]
5155

5256
name: Unit (PHP ${{ matrix.php-versions }}, TYPO3 ${{ matrix.typo3-versions }})
5357
steps:
5458
-
55-
uses: actions/checkout@v3
59+
uses: actions/checkout@v4
60+
61+
-
62+
name: Set up Docker Compose
63+
run: |
64+
docker-compose --version || {
65+
echo "Docker Compose not found, installing..."
66+
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
67+
sudo chmod +x /usr/local/bin/docker-compose
68+
docker-compose --version
69+
}
5670
5771
-
5872
name: Validate composer.json
5973
run: Build/Scripts/runTests.sh -p ${{ matrix.php-versions }} -t ${{ matrix.typo3-versions }} -s composerValidate
6074

6175
-
6276
name: Cache composer dependencies
63-
uses: actions/cache@v3
77+
uses: actions/cache@v4
6478
with:
6579
path: ~/.composer/cache
6680
key: php-${{ matrix.php-versions }}-typo3-${{ matrix.typo3-versions }}
@@ -80,27 +94,31 @@ jobs:
8094
strategy:
8195
max-parallel: 2
8296
matrix:
83-
php-versions: ['8.2', '8.1', '8.0']
84-
typo3-versions: [12, 11]
85-
exclude:
86-
- php-versions: '8.0'
87-
typo3-versions: 12
88-
include:
89-
- php-versions: '7.4'
90-
typo3-versions: 11
97+
php-versions: ['8.3', '8.2']
98+
typo3-versions: [13, 12]
9199

92100
name: Functional (PHP ${{ matrix.php-versions }}, TYPO3 ${{ matrix.typo3-versions }})
93101
steps:
94102
-
95-
uses: actions/checkout@v3
103+
uses: actions/checkout@v4
104+
105+
-
106+
name: Set up Docker Compose
107+
run: |
108+
docker-compose --version || {
109+
echo "Docker Compose not found, installing..."
110+
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
111+
sudo chmod +x /usr/local/bin/docker-compose
112+
docker-compose --version
113+
}
96114
97115
-
98116
name: Validate composer.json
99117
run: Build/Scripts/runTests.sh -p ${{ matrix.php-versions }} -t ${{ matrix.typo3-versions }} -s composerValidate
100118

101119
-
102120
name: Cache composer dependencies
103-
uses: actions/cache@v3
121+
uses: actions/cache@v4
104122
with:
105123
path: ~/.composer/cache
106124
key: php-${{ matrix.php-versions }}-typo3-${{ matrix.typo3-versions }}

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.Build
22
composer.lock
33
/var
4-
/Build/.phpunit.result.cache
4+
/Build/Testing/.phpunit.result.cache
5+
/Build/Testing/.phpunit.cache/
56
/Build/testing-docker/.env

Build/Scripts/runTests.sh

+33-35
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,15 @@ Options:
6161
- postgres: use postgres
6262
- sqlite: use sqlite
6363
64-
-p <7.4|8.0|8.1|8.2>
64+
-p <8.2|8.3>
6565
Specifies the PHP minor version to be used
66-
- 7.4 (default): use PHP 7.4
67-
- 8.0: use PHP 8.0
68-
- 8.1: use PHP 8.1
69-
- 8.2: use PHP 8.2
66+
- 8.2 (default): use PHP 8.2
67+
- 8.3: use PHP 8.3
7068
71-
-t <11|12>
69+
-t <12|13>
7270
Specifies the TYPO3 version to be used
73-
- 11 (default): use TYPO3 11
74-
- 12: use TYPO3 12
71+
- 12 (default): use TYPO3 12
72+
- 13: use TYPO3 13
7573
7674
-e "<phpunit options>"
7775
Only with -s functional|unit
@@ -103,16 +101,16 @@ Options:
103101
Show this help.
104102
105103
Examples:
106-
# Run unit tests using PHP 7.4
104+
# Run unit tests using PHP 8.2 and TYPO3 12
107105
./Build/Scripts/runTests.sh
108106
109-
# Run unit tests using PHP 7.3
110-
./Build/Scripts/runTests.sh -p 7.3
107+
# Run unit tests using PHP 8.3 and TYPO3 13
108+
./Build/Scripts/runTests.sh -p 8.3 -t 13
111109
EOF
112110

113-
# Test if docker-compose exists, else exit out with error
114-
if ! type "docker-compose" > /dev/null; then
115-
echo "This script relies on docker and docker-compose. Please install" >&2
111+
# Test if docker exists, else exit out with error
112+
if ! type "docker" > /dev/null; then
113+
echo "This script relies on docker and docker. Please install" >&2
116114
exit 1
117115
fi
118116

@@ -133,8 +131,8 @@ else
133131
fi
134132
TEST_SUITE="unit"
135133
DBMS="mariadb"
136-
PHP_VERSION="7.4"
137-
TYPO3_VERSION="11"
134+
PHP_VERSION="8.2"
135+
TYPO3_VERSION="12"
138136
PHP_XDEBUG_ON=0
139137
PHP_XDEBUG_PORT=9003
140138
EXTRA_TEST_OPTIONS=""
@@ -216,41 +214,41 @@ fi
216214
case ${TEST_SUITE} in
217215
composerInstall)
218216
setUpDockerComposeDotEnv
219-
docker-compose run composer_install
217+
docker compose run composer_install
220218
SUITE_EXIT_CODE=$?
221-
docker-compose down
219+
docker compose down
222220
;;
223221
composerInstallMax)
224222
setUpDockerComposeDotEnv
225-
docker-compose run composer_install_max
223+
docker compose run composer_install_max
226224
SUITE_EXIT_CODE=$?
227-
docker-compose down
225+
docker compose down
228226
;;
229227
composerInstallMin)
230228
setUpDockerComposeDotEnv
231-
docker-compose run composer_install_min
229+
docker compose run composer_install_min
232230
SUITE_EXIT_CODE=$?
233-
docker-compose down
231+
docker compose down
234232
;;
235233
composerValidate)
236234
setUpDockerComposeDotEnv
237-
docker-compose run composer_validate
235+
docker compose run composer_validate
238236
SUITE_EXIT_CODE=$?
239-
docker-compose down
237+
docker compose down
240238
;;
241239
functional)
242240
setUpDockerComposeDotEnv
243241
case ${DBMS} in
244242
mariadb)
245-
docker-compose run functional_mariadb10
243+
docker compose run functional_mariadb10
246244
SUITE_EXIT_CODE=$?
247245
;;
248246
mssql)
249-
docker-compose run functional_mssql2019latest
247+
docker compose run functional_mssql2019latest
250248
SUITE_EXIT_CODE=$?
251249
;;
252250
postgres)
253-
docker-compose run functional_postgres10
251+
docker compose run functional_postgres10
254252
SUITE_EXIT_CODE=$?
255253
;;
256254
sqlite)
@@ -259,7 +257,7 @@ case ${TEST_SUITE} in
259257
# root if docker creates it. Thank you, docker. We create the path beforehand
260258
# to avoid permission issues.
261259
mkdir -p ${ROOT_DIR}/.Build/Web/typo3temp/var/tests/functional-sqlite-dbs/
262-
docker-compose run functional_sqlite
260+
docker compose run functional_sqlite
263261
SUITE_EXIT_CODE=$?
264262
;;
265263
*)
@@ -268,25 +266,25 @@ case ${TEST_SUITE} in
268266
echo "${HELP}" >&2
269267
exit 1
270268
esac
271-
docker-compose down
269+
docker compose down
272270
;;
273271
lintPhp)
274272
setUpDockerComposeDotEnv
275-
docker-compose run lint_php
273+
docker compose run lint_php
276274
SUITE_EXIT_CODE=$?
277-
docker-compose down
275+
docker compose down
278276
;;
279277
lintEditorconfig)
280278
setUpDockerComposeDotEnv
281-
docker-compose run lint_editorconfig
279+
docker compose run lint_editorconfig
282280
SUITE_EXIT_CODE=$?
283-
docker-compose down
281+
docker compose down
284282
;;
285283
unit)
286284
setUpDockerComposeDotEnv
287-
docker-compose run unit
285+
docker compose run unit
288286
SUITE_EXIT_CODE=$?
289-
docker-compose down
287+
docker compose down
290288
;;
291289
update)
292290
# pull typo3/core-testing-*:latest versions of those ones that exist locally

Build/Testing/FunctionalTests.xml

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1+
<?xml version="1.0"?>
12
<phpunit
23
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.2/phpunit.xsd"
45
backupGlobals="true"
56
bootstrap="FunctionalTestsBootstrap.php"
67
colors="true"
7-
convertErrorsToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
forceCoversAnnotation="false"
108
stopOnError="false"
119
stopOnFailure="false"
1210
stopOnIncomplete="false"
1311
stopOnSkipped="false"
14-
verbose="false"
1512
beStrictAboutTestsThatDoNotTestAnything="false"
1613
failOnWarning="true"
14+
cacheDirectory=".phpunit.cache"
15+
requireCoverageMetadata="false"
1716
>
18-
<testsuites>
19-
<testsuite name="Functional tests">
20-
<directory>../../Tests/Functional/</directory>
21-
</testsuite>
22-
</testsuites>
23-
<php>
24-
<const name="TYPO3_MODE" value="BE" />
25-
<ini name="display_errors" value="1" />
26-
<env name="TYPO3_CONTEXT" value="Testing" />
27-
</php>
17+
<testsuites>
18+
<testsuite name="Functional tests">
19+
<directory>../../Tests/Functional/</directory>
20+
</testsuite>
21+
</testsuites>
22+
<php>
23+
<const name="TYPO3_MODE" value="BE"/>
24+
<ini name="display_errors" value="1"/>
25+
<env name="TYPO3_CONTEXT" value="Testing"/>
26+
</php>
2827
</phpunit>

Build/Testing/UnitTests.xml

+14-16
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
1+
<?xml version="1.0"?>
12
<phpunit
23
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.2/phpunit.xsd"
45
backupGlobals="true"
56
bootstrap="UnitTestsBootstrap.php"
67
colors="true"
7-
convertErrorsToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
convertNoticesToExceptions="true"
10-
forceCoversAnnotation="false"
118
processIsolation="false"
129
stopOnError="false"
1310
stopOnFailure="false"
1411
stopOnIncomplete="false"
1512
stopOnSkipped="false"
16-
verbose="false"
1713
beStrictAboutTestsThatDoNotTestAnything="false"
1814
failOnWarning="true"
15+
cacheDirectory=".phpunit.cache"
16+
requireCoverageMetadata="false"
1917
>
20-
<testsuites>
21-
<testsuite name="Unit tests">
22-
<directory>../../Tests/Unit/</directory>
23-
</testsuite>
24-
</testsuites>
25-
<php>
26-
<const name="TYPO3_MODE" value="BE" />
27-
<ini name="display_errors" value="1" />
28-
<env name="TYPO3_CONTEXT" value="Testing" />
29-
</php>
18+
<testsuites>
19+
<testsuite name="Unit tests">
20+
<directory>../../Tests/Unit/</directory>
21+
</testsuite>
22+
</testsuites>
23+
<php>
24+
<const name="TYPO3_MODE" value="BE"/>
25+
<ini name="display_errors" value="1"/>
26+
<env name="TYPO3_CONTEXT" value="Testing"/>
27+
</php>
3028
</phpunit>

Build/testing-docker/docker-compose.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '2.3'
21
services:
32
mariadb10:
43
image: mariadb:10
@@ -301,7 +300,7 @@ services:
301300
php -v | grep '^PHP';
302301
echo -n 'ec version: ';
303302
.Build/bin/ec -version;
304-
.Build/bin/ec -exclude .phpunit.result.cache .
303+
.Build/bin/ec -exclude .phpunit.* .
305304
"
306305
307306
unit:

0 commit comments

Comments
 (0)