Skip to content

Commit b6f5c1a

Browse files
committed
[TASK] Make extensions compatible to TYPO3 v13
1 parent 3e6715a commit b6f5c1a

76 files changed

Lines changed: 524 additions & 3612 deletions

File tree

Some content is hidden

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

.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/Build/ export-ignore
22
/Tests/ export-ignore
33
/.gitattributes export-ignore
4-
/.gitlab-ci.yml export-ignore
5-
/.travis.yml export-ignore
4+
/.gitlab-ci.yml export-ignore

.github/workflows/ci.yaml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
strategy:
1616
matrix:
1717
php-version:
18-
- 8.1
1918
- 8.2
2019
- 8.3
2120
steps:
@@ -41,7 +40,7 @@ jobs:
4140
- name: Install PHP
4241
uses: shivammathur/setup-php@v2
4342
with:
44-
php-version: "8.1"
43+
php-version: "8.2"
4544
tools: composer:v2
4645

4746
- name: Install dependencies
@@ -57,12 +56,9 @@ jobs:
5756
strategy:
5857
matrix:
5958
include:
60-
- php-version: '8.1'
61-
typo3-version: '^12.4'
6259
- php-version: '8.2'
63-
typo3-version: '^12.4'
6460
- php-version: '8.3'
65-
typo3-version: '^12.4'
61+
- php-version: '8.4'
6662
steps:
6763
- uses: actions/checkout@v4
6864

@@ -74,7 +70,9 @@ jobs:
7470

7571
- name: Install dependencies with expected TYPO3 version
7672
run: |-
77-
composer require --no-interaction --prefer-dist --no-progress "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-extbase:${{ matrix.typo3-version }}" "typo3/cms-frontend:${{ matrix.typo3-version }}"
73+
composer remove --dev ssch/typo3-rector \
74+
&& composer require typo3/cms-install "*" \
75+
&& composer install --no-progress --no-ansi --no-interaction
7876
7977
- name: Code Quality (by PHPStan)
8078
run: vendor/bin/phpstan analyse -c Build/phpstan.neon
@@ -91,29 +89,20 @@ jobs:
9189
with:
9290
nix_path: nixpkgs=channel:nixos-unstable
9391

94-
- name: Run Unit Tests PHP8.1
95-
run: nix-shell --arg phpVersion \"php81\" --pure --run project-test-unit
96-
9792
- name: Run Unit Tests PHP8.2
9893
run: nix-shell --arg phpVersion \"php82\" --pure --run project-test-unit
9994

10095
- name: Run Unit Tests PHP8.3
10196
run: nix-shell --arg phpVersion \"php83\" --pure --run project-test-unit
10297

103-
- name: Run Functional Tests PHP8.1
104-
run: nix-shell --arg phpVersion \"php81\" --pure --run project-test-functional
105-
106-
- name: Run Functional Tests PHP8.2
107-
run: nix-shell --arg phpVersion \"php82\" --pure --run project-test-functional
108-
109-
- name: Run Functional Tests PHP8.3
110-
run: nix-shell --arg phpVersion \"php83\" --pure --run project-test-functional
111-
112-
- name: Run Acceptance Tests PHP8.1
113-
run: nix-shell --arg phpVersion \"php81\" --pure --run project-test-acceptance
98+
- name: Run Unit Tests PHP8.4
99+
run: nix-shell --arg phpVersion \"php84\" --pure --run project-test-unit
114100

115101
- name: Run Acceptance Tests PHP8.2
116102
run: nix-shell --arg phpVersion \"php82\" --pure --run project-test-acceptance
117103

118104
- name: Run Acceptance Tests PHP8.3
119105
run: nix-shell --arg phpVersion \"php83\" --pure --run project-test-acceptance
106+
107+
- name: Run Acceptance Tests PHP8.4
108+
run: nix-shell --arg phpVersion \"php84\" --pure --run project-test-acceptance

.gitlab-ci.yml

Lines changed: 20 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,13 @@ stages:
2323
- documentation
2424

2525
lint:cgl:
26-
image: $CI_REGISTRY/containers/phpunit-with-php-8.1:main
26+
image: $CI_REGISTRY/containers/phpunit-with-php-8.2:main
2727
stage: lint
2828
before_script:
29-
- sed -i -e "s#ssh://git@code.extco.de:22722#https://gitlab-ci-token:$CI_JOB_TOKEN@code.extco.de#g" composer.json
30-
- composer config platform.php 8.1
31-
- composer remove typo3/cms-core --no-update
29+
- composer remove typo3/cms-* --no-update
3230
- composer install --no-progress --no-ansi --no-interaction
3331
script:
3432
- vendor/bin/php-cs-fixer fix --config=Build/.php-cs-fixer.dist.php -v --dry-run --using-cache=no --path-mode=intersection ./
35-
36-
lint:typoscriptcgl:
37-
image: php:8.1-alpine
38-
stage: lint
39-
before_script:
40-
- apk add --no-cache bash curl git mercurial openssh openssl parallel subversion tini zlib-dev libzip-dev zip icu-dev g++
41-
- docker-php-ext-install mysqli && docker-php-ext-install zip && docker-php-ext-configure intl && docker-php-ext-install intl && docker-php-ext-enable intl
42-
- wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig
43-
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
44-
- php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
45-
- php composer-setup.php --no-ansi --install-dir=/usr/bin --filename=composer
46-
- php -r "unlink('composer-setup.php'); unlink('installer.sig');"
47-
- sed -i -e "s#ssh://git@code.extco.de:22722#https://gitlab-ci-token:$CI_JOB_TOKEN@code.extco.de#g" composer.json
48-
- composer config platform.php 8.1
49-
- composer remove typo3/cms-core --no-update
50-
- composer install --no-progress --no-ansi --no-interaction
51-
script:
5233
- vendor/bin/typoscript-lint -c Build/typoscriptlint.yaml Configuration
5334

5435
lint:yaml:
@@ -65,12 +46,6 @@ lint:yaml:
6546
script:
6647
- find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
6748

68-
lint:php81:
69-
<<: *lint_php
70-
stage: lint
71-
variables:
72-
CONTAINER_IMAGE: php:8.1-alpine
73-
7449
lint:php82:
7550
<<: *lint_php
7651
variables:
@@ -82,11 +57,9 @@ lint:php83:
8257
CONTAINER_IMAGE: php:8.3-alpine
8358

8459
phpstan:analyse:
85-
image: $CI_REGISTRY/containers/phpunit-with-php-8.1:main
60+
image: $CI_REGISTRY/containers/phpunit-with-php-8.2:main
8661
stage: lint
8762
before_script:
88-
- sed -i -e "s#ssh://git@code.extco.de:22722#https://gitlab-ci-token:$CI_JOB_TOKEN@code.extco.de#g" composer.json
89-
- composer config platform.php 8.1
9063
- composer install --no-progress --no-ansi --no-interaction
9164
script:
9265
- vendor/bin/phpstan analyse -c Build/phpstan.neon --memory-limit 256M
@@ -99,84 +72,67 @@ phpstan:analyse:
9972
only:
10073
- branches
10174
before_script:
102-
- composer config --no-plugins allow-plugins.typo3/cms-composer-installers true
103-
- composer config --no-plugins allow-plugins.typo3/class-alias-loader true
104-
- composer require typo3/cms-core="${TYPO3_VERSION}"
75+
- composer install --no-progress --no-ansi --no-interaction
10576
script:
10677
- vendor/bin/phpunit -c Build/UnitTests.xml
107-
- typo3DatabaseDriver=pdo_sqlite vendor/bin/phpunit -c Build/FunctionalTests.xml
10878

109-
# Build in PHP 8.1 and TYPO3 12.4
110-
test:php81:typo3_12:
79+
test:phpunit.php82:
11180
<<: *test_php
11281
variables:
113-
CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.1:main
114-
TYPO3_VERSION: ^12.4
82+
CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.2:main
11583

116-
# Build in PHP 8.2 and TYPO3 12.4
117-
test:php82:typo3_12:
84+
test:phpunit.php83:
11885
<<: *test_php
11986
variables:
120-
CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.2:main
121-
TYPO3_VERSION: ^12.4
87+
CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.3:main
12288

123-
# Build in PHP 8.3 and TYPO3 12.4
124-
test:php83:typo3_12:
89+
test:phpunit.php84:
12590
<<: *test_php
12691
variables:
127-
CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.3:main
128-
TYPO3_VERSION: ^12.4
92+
CONTAINER_IMAGE: $CI_REGISTRY/containers/phpunit-with-php-8.4:main
12993

13094
.test_codeception: &test_codeception
13195
stage: test
13296
image: $CONTAINER_IMAGE
13397
only:
13498
- branches
13599
before_script:
136-
- sed -i -e "s#ssh://git@code.extco.de:22722#https://gitlab-ci-token:$CI_JOB_TOKEN@code.extco.de#g" composer.json
137-
- composer config --no-plugins allow-plugins.typo3/cms-composer-installers true
138-
- composer config --no-plugins allow-plugins.typo3/class-alias-loader true
139-
- composer require typo3/cms-core="${TYPO3_VERSION}"
100+
- composer install --no-progress --no-ansi --no-interaction
140101
script:
141102
- mkdir -p .build/public/typo3temp/var/tests/acceptance-sqlite-dbs
142103
- export typo3DatabaseDriver=pdo_sqlite
143104
- export PROJECT_ROOT="$(pwd)"
144105
- export INSTANCE_PATH="$(pwd)/.build/web/typo3temp/var/tests/acceptance"
145106
- mkdir -p "$INSTANCE_PATH"
146107
- mkdir -p "$PROJECT_ROOT/.build/web/typo3temp/var/tests/acceptance-logs/"
108+
- vendor/bin/codecept build
147109
- vendor/bin/codecept run
148110
artifacts:
149111
paths:
150112
- .build
151113
expire_in: 1 day
152114
when: always
153115

154-
# Build in PHP 8.1 and TYPO3 12.4
155-
test:codception:php81:typo3_12:
116+
test:codeception:php82:
156117
<<: *test_codeception
157118
variables:
158-
CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.1:main
159-
TYPO3_VERSION: ^12.4
119+
CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.2:main
160120
GECKODRIVER_VERSION: v0.34.0
161121

162-
# Build in PHP 8.2 and TYPO3 12.4
163-
test:codception:php82:typo3_12:
122+
test:codeception:php83:
164123
<<: *test_codeception
165124
needs:
166-
- test:codception:php81:typo3_12
125+
- test:codeception:php82
167126
variables:
168-
CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.2:main
169-
TYPO3_VERSION: ^12.4
127+
CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.3:main
170128
GECKODRIVER_VERSION: v0.34.0
171129

172-
# Build in PHP 8.3 and TYPO3 12.4
173-
test:codception:php83:typo3_12:
130+
test:codeception:php84:
174131
<<: *test_codeception
175132
needs:
176-
- test:codception:php82:typo3_12
133+
- test:codeception:php83
177134
variables:
178-
CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.3:main
179-
TYPO3_VERSION: ^12.4
135+
CONTAINER_IMAGE: $CI_REGISTRY/containers/codeception-with-php-8.4:main
180136
GECKODRIVER_VERSION: v0.34.0
181137

182138
documentation:

Build/FunctionalTests.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" bootstrap="../vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php" colors="true" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" beStrictAboutTestsThatDoNotTestAnything="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" cacheDirectory=".phpunit.cache" requireCoverageMetadata="false">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
4+
backupGlobals="true"
5+
beStrictAboutTestsThatDoNotTestAnything="false"
6+
bootstrap="../vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php"
7+
cacheResult="false"
8+
colors="true"
9+
failOnDeprecation="true"
10+
failOnWarning="true"
11+
failOnRisky="true"
12+
processIsolation="false"
13+
requireCoverageMetadata="false"
14+
stopOnError="false"
15+
stopOnFailure="false"
16+
stopOnIncomplete="false"
17+
stopOnSkipped="false"
18+
>
319
<coverage/>
420
<testsuites>
521
<testsuite name="Cart Books Extension">

Build/UnitTests.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="true" bootstrap="../vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsBootstrap.php" colors="true" processIsolation="false" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false" requireCoverageMetadata="false">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
4+
backupGlobals="true"
5+
beStrictAboutTestsThatDoNotTestAnything="false"
6+
bootstrap="../vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsBootstrap.php"
7+
cacheResult="false"
8+
colors="true"
9+
failOnDeprecation="true"
10+
failOnWarning="true"
11+
failOnRisky="true"
12+
processIsolation="false"
13+
requireCoverageMetadata="false"
14+
stopOnError="false"
15+
stopOnFailure="false"
16+
stopOnIncomplete="false"
17+
stopOnSkipped="false"
18+
>
319
<coverage/>
420
<testsuites>
521
<testsuite name="Cart Books Extension">

Build/phplint.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)