Skip to content

Commit 05b656d

Browse files
committed
Merge remote-tracking branch 'origin/TYPO3_11' into NEXT-85
2 parents 46f229b + 12502f6 commit 05b656d

12 files changed

Lines changed: 348 additions & 94 deletions

File tree

.github/workflows/ci.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Adapted from https://github.com/TYPO3GmbH/blog/blob/master/.github/workflows/ci.yml
2+
name: CI
3+
4+
on:
5+
push:
6+
branches: [TYPO3_11]
7+
pull_request:
8+
branches: [TYPO3_11]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
typo3: [ '^11.5' ]
18+
php: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
19+
20+
steps:
21+
- id: checkout
22+
name: Checkout
23+
uses: actions/checkout@v5
24+
25+
- id: setup_php
26+
name: Set up PHP version ${{ matrix.php }}
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php }}
30+
tools: composer:v2
31+
32+
- name: Validate composer.json and composer.lock
33+
run: composer validate
34+
35+
- id: security
36+
name: Security audit
37+
if: ${{ always() && steps.install.conclusion == 'success' }}
38+
run: |
39+
composer audit
40+
41+
- id: composer-cache-vars
42+
name: Composer Cache Vars
43+
run: |
44+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
45+
echo "timestamp=$(date +"%s")" >> $GITHUB_OUTPUT
46+
47+
- id: composer-cache-dependencies
48+
name: Cache Composer dependencies
49+
uses: actions/cache@v4
50+
with:
51+
path: ${{ steps.composer-cache-vars.outputs.dir }}
52+
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.typo3 }}-${{ steps.composer-cache-vars.outputs.timestamp }}
53+
restore-keys: |
54+
${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.typo3 }}-
55+
${{ runner.os }}-composer-${{ matrix.php }}-
56+
${{ runner.os }}-composer-
57+
58+
- id: install
59+
name: Install dependencies with typo3/cms-core:${{ matrix.typo3 }}
60+
run: |
61+
composer require typo3/cms-core:${{ matrix.typo3 }} --no-progress --no-update
62+
composer require typo3/cms-backend:${{ matrix.typo3 }} --no-progress --no-update
63+
composer require typo3/cms-extbase:${{ matrix.typo3 }} --no-progress --no-update
64+
composer require typo3/cms-recordlist:${{ matrix.typo3 }} --no-progress --no-update
65+
composer require typo3/cms-frontend:${{ matrix.typo3 }} --no-progress --no-update
66+
composer require typo3/cms-rte-ckeditor:${{ matrix.typo3 }} --no-progress --no-update
67+
composer install
68+
git checkout composer.json
69+
70+
- id: lint
71+
name: Lint
72+
if: ${{ always() && steps.install.conclusion == 'success' }}
73+
run: |
74+
composer ci:test:php:lint
75+
76+
- id: phpstan
77+
name: PHPStan
78+
if: ${{ always() && steps.install.conclusion == 'success' }}
79+
run: |
80+
composer ci:test:php:phpstan -- --error-format=github
81+
82+
- id: functional
83+
name: Functional Tests
84+
if: ${{ always() && steps.install.conclusion == 'success' }}
85+
env:
86+
typo3DatabaseDriver: pdo_sqlite
87+
run: |
88+
composer ci:test:php:functional
89+
90+
- id: coverage
91+
name: Generate Coverage Report
92+
if: ${{ always() && steps.functional.conclusion == 'success' && matrix.php == '8.1' }}
93+
env:
94+
typo3DatabaseDriver: pdo_sqlite
95+
run: |
96+
composer ci:coverage:functional
97+
98+
- id: upload-coverage
99+
name: Upload Coverage to Codecov
100+
if: ${{ always() && steps.coverage.conclusion == 'success' && matrix.php == '8.1' }}
101+
uses: codecov/codecov-action@v5
102+
with:
103+
files: .Build/logs/clover.xml
104+
fail_ci_if_error: false

.github/workflows/phpcs.yml

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

.github/workflows/phpstan.yml

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

.github/workflows/testing.yml

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

Build/phpstan-baseline.neon

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: "#^Method Netresearch\\\\RteCKEditorImage\\\\Backend\\\\Preview\\\\RteImagePreviewRenderer\\:\\:walk\\(\\) return type has no value type specified in iterable type array\\.$#"
5+
count: 1
6+
path: ../Classes/Backend/Preview/RteImagePreviewRenderer.php
7+
8+
-
9+
message: "#^Property Netresearch\\\\RteCKEditorImage\\\\Backend\\\\Preview\\\\RteImagePreviewRenderer\\:\\:\\$toRemove type has no value type specified in iterable type array\\.$#"
10+
count: 1
11+
path: ../Classes/Backend/Preview/RteImagePreviewRenderer.php
12+
13+
-
14+
message: "#^Call to an undefined method object\\:\\:getFileObject\\(\\)\\.$#"
15+
count: 1
16+
path: ../Classes/Controller/ImageLinkRenderingController.php
17+
18+
-
19+
message: "#^Call to an undefined method object\\:\\:getLogger\\(\\)\\.$#"
20+
count: 1
21+
path: ../Classes/Controller/ImageLinkRenderingController.php
22+
23+
-
24+
message: "#^Call to an undefined method object\\:\\:setMagicImageMaximumDimensions\\(\\)\\.$#"
25+
count: 1
26+
path: ../Classes/Controller/ImageLinkRenderingController.php
27+
28+
-
29+
message: "#^PHPDoc tag @var for variable \\$result has no value type specified in iterable type array\\.$#"
30+
count: 1
31+
path: ../Classes/Controller/ImageLinkRenderingController.php
32+
33+
-
34+
message: "#^Call to an undefined method object\\:\\:getFileObject\\(\\)\\.$#"
35+
count: 1
36+
path: ../Classes/Controller/ImageRenderingController.php
37+
38+
-
39+
message: "#^Call to an undefined method object\\:\\:getLogger\\(\\)\\.$#"
40+
count: 1
41+
path: ../Classes/Controller/ImageRenderingController.php
42+
43+
-
44+
message: "#^Call to an undefined method object\\:\\:setMagicImageMaximumDimensions\\(\\)\\.$#"
45+
count: 1
46+
path: ../Classes/Controller/ImageRenderingController.php
47+
48+
-
49+
message: "#^Parameter \\#1 \\$haystack of function strpos expects string, string\\|null given\\.$#"
50+
count: 1
51+
path: ../Classes/Controller/ImageRenderingController.php
52+
53+
-
54+
message: "#^Parameter \\#1 \\$(string1|str1) of function strncasecmp expects string, string\\|null given\\.$#"
55+
count: 1
56+
path: ../Classes/Controller/ImageRenderingController.php
57+
58+
-
59+
message: "#^Parameter \\#1 \\$(string1|str1) of function strncmp expects string, string\\|null given\\.$#"
60+
count: 1
61+
path: ../Classes/Controller/ImageRenderingController.php
62+
63+
-
64+
message: "#^PHPDoc tag @var for variable \\$bparams has no value type specified in iterable type array\\.$#"
65+
count: 1
66+
path: ../Classes/Controller/SelectImageController.php
67+
68+
-
69+
message: "#^Property Netresearch\\\\RteCKEditorImage\\\\Controller\\\\SelectImageController\\:\\:\\$magicImageService \\(TYPO3\\\\CMS\\\\Core\\\\Resource\\\\Service\\\\MagicImageService\\) does not accept object\\.$#"
70+
count: 1
71+
path: ../Classes/Controller/SelectImageController.php
72+
73+
-
74+
message: "#^Property Netresearch\\\\RteCKEditorImage\\\\Controller\\\\SelectImageController\\:\\:\\$resourceFactory \\(TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ResourceFactory\\) does not accept object\\.$#"
75+
count: 1
76+
path: ../Classes/Controller/SelectImageController.php
77+
78+
-
79+
message: "#^Property Netresearch\\\\RteCKEditorImage\\\\Controller\\\\SelectImageController\\:\\:\\$richText \\(TYPO3\\\\CMS\\\\Core\\\\Configuration\\\\Richtext\\) does not accept object\\.$#"
80+
count: 1
81+
path: ../Classes/Controller/SelectImageController.php
82+
83+
-
84+
message: "#^Call to an undefined method object\\:\\:createMagicImage\\(\\)\\.$#"
85+
count: 3
86+
path: ../Classes/Database/RteImagesDbHook.php
87+
88+
-
89+
message: "#^Call to an undefined method object\\:\\:getCache\\(\\)\\.$#"
90+
count: 1
91+
path: ../Classes/Database/RteImagesDbHook.php
92+
93+
-
94+
message: "#^Call to an undefined method object\\:\\:getDefaultBackendStoragePid\\(\\)\\.$#"
95+
count: 1
96+
path: ../Classes/Database/RteImagesDbHook.php
97+
98+
-
99+
message: "#^Call to an undefined method object\\:\\:getFileObject\\(\\)\\.$#"
100+
count: 2
101+
path: ../Classes/Database/RteImagesDbHook.php
102+
103+
-
104+
message: "#^Call to an undefined method object\\:\\:load\\(\\)\\.$#"
105+
count: 1
106+
path: ../Classes/Database/RteImagesDbHook.php
107+
108+
-
109+
message: "#^Call to an undefined method object\\:\\:parse\\(\\)\\.$#"
110+
count: 1
111+
path: ../Classes/Database/RteImagesDbHook.php
112+
113+
-
114+
message: "#^Call to an undefined method object\\:\\:retrieveFileOrFolderObject\\(\\)\\.$#"
115+
count: 1
116+
path: ../Classes/Database/RteImagesDbHook.php
117+
118+
-
119+
message: "#^Call to an undefined method object\\:\\:setAspect\\(\\)\\.$#"
120+
count: 2
121+
path: ../Classes/Database/RteImagesDbHook.php
122+
123+
-
124+
message: "#^Call to an undefined method object\\:\\:setMagicImageMaximumDimensions\\(\\)\\.$#"
125+
count: 1
126+
path: ../Classes/Database/RteImagesDbHook.php
127+
128+
-
129+
message: "#^Class Netresearch\\\\RteCKEditorImage\\\\Database\\\\RteImagesDbHook has an uninitialized property \\$pObj\\. Give it default value or assign it in the constructor\\.$#"
130+
count: 1
131+
path: ../Classes/Database/RteImagesDbHook.php
132+
133+
-
134+
message: "#^Class Netresearch\\\\RteCKEditorImage\\\\Database\\\\RteImagesDbHook has an uninitialized property \\$transformationKey\\. Give it default value or assign it in the constructor\\.$#"
135+
count: 1
136+
path: ../Classes/Database/RteImagesDbHook.php
137+
138+
-
139+
message: "#^Method Netresearch\\\\RteCKEditorImage\\\\Database\\\\RteImagesDbHook\\:\\:getProcessedFile\\(\\) has parameter \\$attribArray with no value type specified in iterable type array\\.$#"
140+
count: 1
141+
path: ../Classes/Database/RteImagesDbHook.php
142+
143+
-
144+
message: "#^Call to an undefined method object\\:\\:getLogger\\(\\)\\.$#"
145+
count: 1
146+
path: ../ext_localconf.php
147+
148+
-
149+
message: "#^Call to an undefined method object\\:\\:getMessageQueueByIdentifier\\(\\)\\.$#"
150+
count: 1
151+
path: ../ext_localconf.php
152+
153+
-
154+
message: "#^Call to an undefined method object\\:\\:getQueryBuilderForTable\\(\\)\\.$#"
155+
count: 1
156+
path: ../ext_localconf.php
157+
158+
-
159+
message: "#^Call to an undefined method object\\:\\:isEnvironmentInBackendMode\\(\\)\\.$#"
160+
count: 1
161+
path: ../ext_localconf.php

Build/phpstan.neon

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
includes:
2+
- %currentWorkingDirectory%/.Build/vendor/phpstan/phpstan-strict-rules/rules.neon
3+
# - %currentWorkingDirectory%/.Build/vendor/phpstan/phpstan-phpunit/rules.neon
4+
- %currentWorkingDirectory%/Build/phpstan-baseline.neon
5+
6+
parameters:
7+
# Level 8 is appropriate for TYPO3 v11 compatibility
8+
level: 8
9+
10+
paths:
11+
- %currentWorkingDirectory%/Classes/
12+
- %currentWorkingDirectory%/Configuration/
13+
- %currentWorkingDirectory%/Resources/
14+
- %currentWorkingDirectory%/Tests/
15+
- %currentWorkingDirectory%/ext_localconf.php
16+
17+
excludePaths:
18+
- %currentWorkingDirectory%/.Build/*
19+
- %currentWorkingDirectory%/ext_emconf.php
20+
21+
# Strict configuration options for maximum code quality
22+
treatPhpDocTypesAsCertain: false
23+
reportUnmatchedIgnoredErrors: true
24+
25+
# Advanced type inference and checking
26+
inferPrivatePropertyTypeFromConstructor: true
27+
checkMissingCallableSignature: true
28+
checkUninitializedProperties: true

Build/phpunit/FunctionalTests.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
<directory>../../Tests/Functional/</directory>
4545
</testsuite>
4646
</testsuites>
47+
<coverage>
48+
<include>
49+
<directory suffix=".php">../../Classes</directory>
50+
</include>
51+
</coverage>
4752
<php>
4853
<!--
4954
@deprecated: Set this to not suppress warnings, notices and deprecations in functional tests

0 commit comments

Comments
 (0)