Skip to content

Commit 4ffe5d0

Browse files
committed
[TASK] v14 ci
1 parent 70e9e89 commit 4ffe5d0

20 files changed

+366
-124
lines changed

Build/Scripts/runTests.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ Options:
5050
- postgres: use postgres
5151
- sqlite: use sqlite
5252
53-
-p <7.2|7.3|7.4|8.0|8.1>
53+
-p <8.1|8.2|8.3|8.4>
5454
Specifies the PHP minor version to be used
55-
- 7.4 (default): use PHP 7.4
55+
- 8.3 (default): use PHP 8.3
5656
5757
-e "<phpunit or codeception options>"
5858
Only with -s acceptance|functional|unit
@@ -88,11 +88,11 @@ Options:
8888
Show this help.
8989
9090
Examples:
91-
# Run unit tests using PHP 7.4
91+
# Run unit tests using PHP 8.4
9292
./Build/Scripts/runTests.sh
9393
94-
# Run unit tests using PHP 7.3
95-
./Build/Scripts/runTests.sh -p 7.3
94+
# Run unit tests using PHP 8.3
95+
./Build/Scripts/runTests.sh -p 8.3
9696
EOF
9797

9898
# Go to the directory this script is located, so everything else is relative
@@ -106,12 +106,12 @@ cd ../testing-docker || exit 1
106106
ROOT_DIR=`readlink -f ${PWD}/../../`
107107
TEST_SUITE="unit"
108108
DBMS="mariadb"
109-
PHP_VERSION="7.4"
109+
PHP_VERSION="8.3"
110110
PHP_XDEBUG_ON=0
111111
PHP_XDEBUG_PORT=9000
112112
EXTRA_TEST_OPTIONS=""
113113
SCRIPT_VERBOSE=0
114-
TYPO3="10"
114+
TYPO3="13"
115115

116116
# Option parsing
117117
# Reset in case getopts has been used previously in the shell

Build/php-cs-fixer.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22

33
$config = \TYPO3\CodingStandards\CsFixerConfig::create();
44
$config->getFinder()->exclude(['var'])->in(__DIR__ . '/..');
5+
$config->addRules([
6+
'nullable_type_declaration' => [
7+
'syntax' => 'question_mark',
8+
],
9+
'nullable_type_declaration_for_default_null_value' => true,
10+
]);
511
return $config;

Build/phpstan-baseline12.neon

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\FrontendTypoScript\\:\\:getConfigArray\\(\\)\\.$#"
5+
count: 2
6+
path: ../Classes/CacheHelper.php
7+
8+
-
9+
message: "#^Instantiated class TYPO3\\\\CMS\\\\Core\\\\Cache\\\\CacheTag not found\\.$#"
10+
count: 1
11+
path: ../Classes/CacheHelper.php
12+
13+
-
14+
message: "#^Method TYPO3\\\\CMS\\\\Frontend\\\\Cache\\\\CacheLifetimeCalculator\\:\\:calculateLifetimeForPage\\(\\) invoked with 4 parameters, 5 required\\.$#"
15+
count: 1
16+
path: ../Classes/CacheHelper.php
17+
18+
-
19+
message: "#^Parameter \\#4 \\$defaultCacheTimoutInSeconds of method TYPO3\\\\CMS\\\\Frontend\\\\Cache\\\\CacheLifetimeCalculator\\:\\:calculateLifetimeForPage\\(\\) expects int, TYPO3\\\\CMS\\\\Core\\\\Context\\\\Context given\\.$#"
20+
count: 1
21+
path: ../Classes/CacheHelper.php
22+
23+
-
24+
message: "#^Call to method getId\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
25+
count: 1
26+
path: ../Classes/Compiler/LanguageMenuCompiler.php
27+
28+
-
29+
message: "#^PHPDoc tag @var for variable \\$pageInformation contains unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
30+
count: 1
31+
path: ../Classes/Compiler/LanguageMenuCompiler.php
32+
33+
-
34+
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
35+
count: 1
36+
path: ../Classes/ContentObject/BreadcrumbsContentObject.php
37+
38+
-
39+
message: "#^Call to method getRootLine\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
40+
count: 1
41+
path: ../Classes/ContentObject/BreadcrumbsContentObject.php
42+
43+
-
44+
message: "#^PHPDoc tag @var for variable \\$pageInformation contains unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
45+
count: 1
46+
path: ../Classes/ContentObject/BreadcrumbsContentObject.php
47+
48+
-
49+
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
50+
count: 1
51+
path: ../Classes/ContentObject/LanguageMenuContentObject.php
52+
53+
-
54+
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
55+
count: 1
56+
path: ../Classes/ContentObject/ListMenuContentObject.php
57+
58+
-
59+
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
60+
count: 1
61+
path: ../Classes/ContentObject/TreeMenuContentObject.php
62+
63+
-
64+
message: "#^Call to method getRootLine\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
65+
count: 1
66+
path: ../Classes/DataProcessing/BreadcrumbsMenu.php
67+
68+
-
69+
message: "#^PHPDoc tag @var for variable \\$pageInformation contains unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
70+
count: 1
71+
path: ../Classes/DataProcessing/BreadcrumbsMenu.php
72+
73+
-
74+
message: "#^Call to method getId\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
75+
count: 1
76+
path: ../Classes/PageStateMarker.php
77+
78+
-
79+
message: "#^Call to method getRootLine\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
80+
count: 1
81+
path: ../Classes/PageStateMarker.php
82+
83+
-
84+
message: "#^Method B13\\\\Menus\\\\PageStateMarker\\:\\:getPageInformationFromRequest\\(\\) has invalid return type TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
85+
count: 1
86+
path: ../Classes/PageStateMarker.php
87+
88+
-
89+
message: "#^PHPDoc tag @var for variable \\$pageInformation contains unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
90+
count: 1
91+
path: ../Classes/PageStateMarker.php

Build/phpstan-baseline13.neon

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: "#^Call to protected method get_cache_timeout\\(\\) of class TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController\\.$#"
5+
count: 1
6+
path: ../Classes/CacheHelper.php
7+
8+
-
9+
message: "#^Method TYPO3\\\\CMS\\\\Frontend\\\\Cache\\\\CacheLifetimeCalculator\\:\\:calculateLifetimeForPage\\(\\) invoked with 4 parameters, 5 required\\.$#"
10+
count: 1
11+
path: ../Classes/CacheHelper.php
12+
13+
-
14+
message: "#^Method TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController\\:\\:get_cache_timeout\\(\\) invoked with 0 parameters, 1 required\\.$#"
15+
count: 1
16+
path: ../Classes/CacheHelper.php
17+
18+
-
19+
message: "#^Parameter \\#4 \\$defaultCacheTimoutInSeconds of method TYPO3\\\\CMS\\\\Frontend\\\\Cache\\\\CacheLifetimeCalculator\\:\\:calculateLifetimeForPage\\(\\) expects int, TYPO3\\\\CMS\\\\Core\\\\Context\\\\Context given\\.$#"
20+
count: 1
21+
path: ../Classes/CacheHelper.php
22+
23+
-
24+
message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Core\\\\Site\\\\Entity\\\\SiteLanguage\\:\\:getTwoLetterIsoCode\\(\\)\\.$#"
25+
count: 1
26+
path: ../Classes/Compiler/LanguageMenuCompiler.php
27+
28+
-
29+
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
30+
count: 1
31+
path: ../Classes/ContentObject/BreadcrumbsContentObject.php
32+
33+
-
34+
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
35+
count: 1
36+
path: ../Classes/ContentObject/LanguageMenuContentObject.php
37+
38+
-
39+
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
40+
count: 1
41+
path: ../Classes/ContentObject/ListMenuContentObject.php
42+
43+
-
44+
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
45+
count: 1
46+
path: ../Classes/ContentObject/TreeMenuContentObject.php
47+
48+
-
49+
message: "#^Access to undefined constant TYPO3\\\\CMS\\\\Core\\\\Domain\\\\Repository\\\\PageRepository\\:\\:DOKTYPE_RECYCLER\\.$#"
50+
count: 1
51+
path: ../Classes/Domain/Repository/MenuRepository.php

Build/phpstan-baseline14.neon

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: "#^Call to method addCacheTags\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController\\.$#"
5+
count: 1
6+
path: ../Classes/CacheHelper.php
7+
8+
-
9+
message: "#^Call to method get_cache_timeout\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController\\.$#"
10+
count: 1
11+
path: ../Classes/CacheHelper.php
12+
13+
-
14+
message: "#^Method B13\\\\Menus\\\\CacheHelper\\:\\:getFrontendController\\(\\) has invalid return type TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController\\.$#"
15+
count: 1
16+
path: ../Classes/CacheHelper.php
17+
18+
-
19+
message: "#^Method TYPO3\\\\CMS\\\\Frontend\\\\Cache\\\\CacheLifetimeCalculator\\:\\:calculateLifetimeForPage\\(\\) invoked with 5 parameters, 4 required\\.$#"
20+
count: 2
21+
path: ../Classes/CacheHelper.php
22+
23+
-
24+
message: "#^Parameter \\#4 \\$context of method TYPO3\\\\CMS\\\\Frontend\\\\Cache\\\\CacheLifetimeCalculator\\:\\:calculateLifetimeForPage\\(\\) expects TYPO3\\\\CMS\\\\Core\\\\Context\\\\Context, int given\\.$#"
25+
count: 2
26+
path: ../Classes/CacheHelper.php
27+
28+
-
29+
message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Core\\\\Site\\\\Entity\\\\SiteLanguage\\:\\:getTwoLetterIsoCode\\(\\)\\.$#"
30+
count: 1
31+
path: ../Classes/Compiler/LanguageMenuCompiler.php
32+
33+
-
34+
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
35+
count: 1
36+
path: ../Classes/ContentObject/BreadcrumbsContentObject.php
37+
38+
-
39+
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
40+
count: 1
41+
path: ../Classes/ContentObject/LanguageMenuContentObject.php
42+
43+
-
44+
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
45+
count: 1
46+
path: ../Classes/ContentObject/ListMenuContentObject.php
47+
48+
-
49+
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
50+
count: 1
51+
path: ../Classes/ContentObject/TreeMenuContentObject.php
52+
53+
-
54+
message: "#^Access to undefined constant TYPO3\\\\CMS\\\\Core\\\\Domain\\\\Repository\\\\PageRepository\\:\\:DOKTYPE_RECYCLER\\.$#"
55+
count: 1
56+
path: ../Classes/Domain/Repository/MenuRepository.php

Build/phpstan11.neon

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ parameters:
33

44
paths:
55
- %currentWorkingDirectory%/Classes
6-
- %currentWorkingDirectory%/Tests
7-
excludePaths:
8-
- %currentWorkingDirectory%/Tests/Unit/Domain/Repository/MenuRepositoryTest.php
96
ignoreErrors:
107
-
118
message: '#Cannot call method getLanguageCode\(\) on string.#'

Build/phpstan12.neon

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
1+
includes:
2+
- phpstan-baseline12.neon
13
parameters:
24
level: 5
35

46
paths:
57
- %currentWorkingDirectory%/Classes
6-
- %currentWorkingDirectory%/Tests
7-
excludePaths:
8-
- %currentWorkingDirectory%/Tests/Unit/Domain/Repository/MenuRepositoryTest.php
9-
ignoreErrors:
10-
-
11-
message: '#Call to an undefined static method TYPO3\\CMS\\Frontend\\ContentObject\\AbstractContentObject::__construct\(\).#'
12-
path: %currentWorkingDirectory%/Classes/ContentObject/*
13-
-
14-
message: '#Property TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController::\$id \(int\) does not accept string.#'
15-
path: %currentWorkingDirectory%/Tests/Functional/Compiler/LanguageMenuCompilerTest.php
16-
-
17-
message: '#Call to an undefined method TYPO3\\CMS\\Core\\TypoScript\\FrontendTypoScript::getConfigArray\(\).#'
18-
path: %currentWorkingDirectory%/Classes/CacheHelper.php
19-
-
20-
message: '#Instantiated class TYPO3\\CMS\\Core\\Cache\\CacheDataCollector not found.#'
21-
-
22-
message: '#Instantiated class TYPO3\\CMS\\Core\\Cache\\CacheTag not found.#'

Build/phpstan13.neon

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
1+
includes:
2+
- phpstan-baseline13.neon
13
parameters:
24
level: 5
35

46
paths:
57
- %currentWorkingDirectory%/Classes
6-
- %currentWorkingDirectory%/Tests
7-
excludePaths:
8-
- %currentWorkingDirectory%/Tests/Unit/Domain/Repository/MenuRepositoryTest.php
9-
ignoreErrors:
10-
-
11-
message: '#Call to an undefined method TYPO3\\CMS\\Core\\Site\\Entity\\SiteLanguage::getTwoLetterIsoCode\(\).#'
12-
path: %currentWorkingDirectory%/Classes/Compiler/LanguageMenuCompiler.php
13-
-
14-
message: '#Access to undefined constant TYPO3\\CMS\\Core\\Domain\\Repository\\PageRepository::DOKTYPE_RECYCLER.#'
15-
path: %currentWorkingDirectory%/Classes/Domain/Repository/MenuRepository.php
16-
-
17-
message: '#Access to undefined constant TYPO3\\CMS\\Core\\Domain\\Repository\\PageRepository::DOKTYPE_RECYCLER.#'
18-
path: %currentWorkingDirectory%/Tests/Unit/Domain/Repository/MenuRepositoryTest.php
19-
-
20-
message: '#.*get_cache_timeout\(\).*#'
21-
path: %currentWorkingDirectory%/Classes/CacheHelper.php
22-
-
23-
message: '#Call to an undefined static method TYPO3\\CMS\\Frontend\\ContentObject\\AbstractContentObject::__construct\(\).#'
24-
path: %currentWorkingDirectory%/Classes/ContentObject/*
25-
-
26-
message: '#Property TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController::\$id \(int\) does not accept string.#'
27-
path: %currentWorkingDirectory%/Tests/Functional/Compiler/LanguageMenuCompilerTest.php

Build/phpstan14.neon

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
1+
includes:
2+
- phpstan-baseline14.neon
13
parameters:
24
level: 5
35

46
paths:
57
- %currentWorkingDirectory%/Classes
6-
- %currentWorkingDirectory%/Tests
7-
excludePaths:
8-
- %currentWorkingDirectory%/Tests/Unit/Domain/Repository/MenuRepositoryTest.php
9-
ignoreErrors:
10-
-
11-
message: '#Call to an undefined method TYPO3\\CMS\\Core\\Site\\Entity\\SiteLanguage::getTwoLetterIsoCode\(\).#'
12-
path: %currentWorkingDirectory%/Classes/Compiler/LanguageMenuCompiler.php
13-
-
14-
message: '#Access to undefined constant TYPO3\\CMS\\Core\\Domain\\Repository\\PageRepository::DOKTYPE_RECYCLER.#'
15-
path: %currentWorkingDirectory%/Classes/Domain/Repository/MenuRepository.php
16-
-
17-
message: '#Access to undefined constant TYPO3\\CMS\\Core\\Domain\\Repository\\PageRepository::DOKTYPE_RECYCLER.#'
18-
path: %currentWorkingDirectory%/Tests/Unit/Domain/Repository/MenuRepositoryTest.php
19-
-
20-
message: '#.*get_cache_timeout\(\).*#'
21-
path: %currentWorkingDirectory%/Classes/CacheHelper.php
22-
-
23-
message: '#Call to an undefined static method TYPO3\\CMS\\Frontend\\ContentObject\\AbstractContentObject::__construct\(\).#'
24-
path: %currentWorkingDirectory%/Classes/ContentObject/*
25-
-
26-
message: '#Property TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController::\$id \(int\) does not accept string.#'
27-
path: %currentWorkingDirectory%/Tests/Functional/Compiler/LanguageMenuCompilerTest.php

Build/testing-docker/docker-compose.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,11 @@ services:
8282
set -x
8383
fi
8484
php -v | grep '^PHP';
85-
if [ ${TYPO3} -eq 11 ]; then
86-
composer require typo3/cms-install:^11.5 typo3/cms-fluid-styled-content:^11.5 --dev -W --no-progress --no-interaction
87-
composer prepare-tests
88-
elif [ ${TYPO3} -eq 12 ]; then
85+
if [ ${TYPO3} -eq 12 ]; then
8986
composer require typo3/cms-install:^12.4 typo3/cms-fluid-styled-content:^12.4 --dev -W --no-progress --no-interaction
9087
composer prepare-tests
91-
elif [ ${TYPO3} -eq 14 ]; then
92-
composer require typo3/cms-install:^14 typo3/cms-fluid-styled-content:^14 --dev -W --no-progress --no-interaction
88+
elif [ ${TYPO3} -eq 13 ]; then
89+
composer require typo3/cms-install:^13.4 typo3/cms-fluid-styled-content:^13.4 --dev -W --no-progress --no-interaction
9390
composer prepare-tests
9491
else
9592
composer install --no-progress --no-interaction

0 commit comments

Comments
 (0)