Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.4', '8.0', '8.1' ]
TYPO3: [ '11' ]
include:
- TYPO3: '12'
php: '8.1'
- TYPO3: '13'
php: '8.3'
php: [ '8.2', '8.3' ]
TYPO3: [ '12', '13', '14' ]

steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
14 changes: 7 additions & 7 deletions Build/Scripts/runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ Options:
- postgres: use postgres
- sqlite: use sqlite

-p <7.2|7.3|7.4|8.0|8.1>
-p <8.1|8.2|8.3|8.4>
Specifies the PHP minor version to be used
- 7.4 (default): use PHP 7.4
- 8.3 (default): use PHP 8.3

-e "<phpunit or codeception options>"
Only with -s acceptance|functional|unit
Expand Down Expand Up @@ -88,11 +88,11 @@ Options:
Show this help.

Examples:
# Run unit tests using PHP 7.4
# Run unit tests using PHP 8.4
./Build/Scripts/runTests.sh

# Run unit tests using PHP 7.3
./Build/Scripts/runTests.sh -p 7.3
# Run unit tests using PHP 8.3
./Build/Scripts/runTests.sh -p 8.3
EOF

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

# Option parsing
# Reset in case getopts has been used previously in the shell
Expand Down
6 changes: 6 additions & 0 deletions Build/php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@

$config = \TYPO3\CodingStandards\CsFixerConfig::create();
$config->getFinder()->exclude(['var'])->in(__DIR__ . '/..');
$config->addRules([
'nullable_type_declaration' => [
'syntax' => 'question_mark',
],
'nullable_type_declaration_for_default_null_value' => true,
]);
return $config;
91 changes: 91 additions & 0 deletions Build/phpstan-baseline12.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
parameters:
ignoreErrors:
-
message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Core\\\\TypoScript\\\\FrontendTypoScript\\:\\:getConfigArray\\(\\)\\.$#"
count: 2
path: ../Classes/CacheHelper.php

-
message: "#^Instantiated class TYPO3\\\\CMS\\\\Core\\\\Cache\\\\CacheTag not found\\.$#"
count: 1
path: ../Classes/CacheHelper.php

-
message: "#^Method TYPO3\\\\CMS\\\\Frontend\\\\Cache\\\\CacheLifetimeCalculator\\:\\:calculateLifetimeForPage\\(\\) invoked with 4 parameters, 5 required\\.$#"
count: 1
path: ../Classes/CacheHelper.php

-
message: "#^Parameter \\#4 \\$defaultCacheTimoutInSeconds of method TYPO3\\\\CMS\\\\Frontend\\\\Cache\\\\CacheLifetimeCalculator\\:\\:calculateLifetimeForPage\\(\\) expects int, TYPO3\\\\CMS\\\\Core\\\\Context\\\\Context given\\.$#"
count: 1
path: ../Classes/CacheHelper.php

-
message: "#^Call to method getId\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
count: 1
path: ../Classes/Compiler/LanguageMenuCompiler.php

-
message: "#^PHPDoc tag @var for variable \\$pageInformation contains unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
count: 1
path: ../Classes/Compiler/LanguageMenuCompiler.php

-
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
count: 1
path: ../Classes/ContentObject/BreadcrumbsContentObject.php

-
message: "#^Call to method getRootLine\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
count: 1
path: ../Classes/ContentObject/BreadcrumbsContentObject.php

-
message: "#^PHPDoc tag @var for variable \\$pageInformation contains unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
count: 1
path: ../Classes/ContentObject/BreadcrumbsContentObject.php

-
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
count: 1
path: ../Classes/ContentObject/LanguageMenuContentObject.php

-
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
count: 1
path: ../Classes/ContentObject/ListMenuContentObject.php

-
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
count: 1
path: ../Classes/ContentObject/TreeMenuContentObject.php

-
message: "#^Call to method getRootLine\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
count: 1
path: ../Classes/DataProcessing/BreadcrumbsMenu.php

-
message: "#^PHPDoc tag @var for variable \\$pageInformation contains unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
count: 1
path: ../Classes/DataProcessing/BreadcrumbsMenu.php

-
message: "#^Call to method getId\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
count: 1
path: ../Classes/PageStateMarker.php

-
message: "#^Call to method getRootLine\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
count: 1
path: ../Classes/PageStateMarker.php

-
message: "#^Method B13\\\\Menus\\\\PageStateMarker\\:\\:getPageInformationFromRequest\\(\\) has invalid return type TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
count: 1
path: ../Classes/PageStateMarker.php

-
message: "#^PHPDoc tag @var for variable \\$pageInformation contains unknown class TYPO3\\\\CMS\\\\Frontend\\\\Page\\\\PageInformation\\.$#"
count: 1
path: ../Classes/PageStateMarker.php
51 changes: 51 additions & 0 deletions Build/phpstan-baseline13.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
parameters:
ignoreErrors:
-
message: "#^Call to protected method get_cache_timeout\\(\\) of class TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController\\.$#"
count: 1
path: ../Classes/CacheHelper.php

-
message: "#^Method TYPO3\\\\CMS\\\\Frontend\\\\Cache\\\\CacheLifetimeCalculator\\:\\:calculateLifetimeForPage\\(\\) invoked with 4 parameters, 5 required\\.$#"
count: 1
path: ../Classes/CacheHelper.php

-
message: "#^Method TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController\\:\\:get_cache_timeout\\(\\) invoked with 0 parameters, 1 required\\.$#"
count: 1
path: ../Classes/CacheHelper.php

-
message: "#^Parameter \\#4 \\$defaultCacheTimoutInSeconds of method TYPO3\\\\CMS\\\\Frontend\\\\Cache\\\\CacheLifetimeCalculator\\:\\:calculateLifetimeForPage\\(\\) expects int, TYPO3\\\\CMS\\\\Core\\\\Context\\\\Context given\\.$#"
count: 1
path: ../Classes/CacheHelper.php

-
message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Core\\\\Site\\\\Entity\\\\SiteLanguage\\:\\:getTwoLetterIsoCode\\(\\)\\.$#"
count: 1
path: ../Classes/Compiler/LanguageMenuCompiler.php

-
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
count: 1
path: ../Classes/ContentObject/BreadcrumbsContentObject.php

-
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
count: 1
path: ../Classes/ContentObject/LanguageMenuContentObject.php

-
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
count: 1
path: ../Classes/ContentObject/ListMenuContentObject.php

-
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
count: 1
path: ../Classes/ContentObject/TreeMenuContentObject.php

-
message: "#^Access to undefined constant TYPO3\\\\CMS\\\\Core\\\\Domain\\\\Repository\\\\PageRepository\\:\\:DOKTYPE_RECYCLER\\.$#"
count: 1
path: ../Classes/Domain/Repository/MenuRepository.php
56 changes: 56 additions & 0 deletions Build/phpstan-baseline14.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
parameters:
ignoreErrors:
-
message: "#^Call to method addCacheTags\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController\\.$#"
count: 1
path: ../Classes/CacheHelper.php

-
message: "#^Call to method get_cache_timeout\\(\\) on an unknown class TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController\\.$#"
count: 1
path: ../Classes/CacheHelper.php

-
message: "#^Method B13\\\\Menus\\\\CacheHelper\\:\\:getFrontendController\\(\\) has invalid return type TYPO3\\\\CMS\\\\Frontend\\\\Controller\\\\TypoScriptFrontendController\\.$#"
count: 1
path: ../Classes/CacheHelper.php

-
message: "#^Method TYPO3\\\\CMS\\\\Frontend\\\\Cache\\\\CacheLifetimeCalculator\\:\\:calculateLifetimeForPage\\(\\) invoked with 5 parameters, 4 required\\.$#"
count: 2
path: ../Classes/CacheHelper.php

-
message: "#^Parameter \\#4 \\$context of method TYPO3\\\\CMS\\\\Frontend\\\\Cache\\\\CacheLifetimeCalculator\\:\\:calculateLifetimeForPage\\(\\) expects TYPO3\\\\CMS\\\\Core\\\\Context\\\\Context, int given\\.$#"
count: 2
path: ../Classes/CacheHelper.php

-
message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Core\\\\Site\\\\Entity\\\\SiteLanguage\\:\\:getTwoLetterIsoCode\\(\\)\\.$#"
count: 1
path: ../Classes/Compiler/LanguageMenuCompiler.php

-
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
count: 1
path: ../Classes/ContentObject/BreadcrumbsContentObject.php

-
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
count: 1
path: ../Classes/ContentObject/LanguageMenuContentObject.php

-
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
count: 1
path: ../Classes/ContentObject/ListMenuContentObject.php

-
message: "#^Call to an undefined static method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\AbstractContentObject\\:\\:__construct\\(\\)\\.$#"
count: 1
path: ../Classes/ContentObject/TreeMenuContentObject.php

-
message: "#^Access to undefined constant TYPO3\\\\CMS\\\\Core\\\\Domain\\\\Repository\\\\PageRepository\\:\\:DOKTYPE_RECYCLER\\.$#"
count: 1
path: ../Classes/Domain/Repository/MenuRepository.php
3 changes: 0 additions & 3 deletions Build/phpstan11.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ parameters:

paths:
- %currentWorkingDirectory%/Classes
- %currentWorkingDirectory%/Tests
excludePaths:
- %currentWorkingDirectory%/Tests/Unit/Domain/Repository/MenuRepositoryTest.php
ignoreErrors:
-
message: '#Cannot call method getLanguageCode\(\) on string.#'
Expand Down
19 changes: 2 additions & 17 deletions Build/phpstan12.neon
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
includes:
- phpstan-baseline12.neon
parameters:
level: 5

paths:
- %currentWorkingDirectory%/Classes
- %currentWorkingDirectory%/Tests
excludePaths:
- %currentWorkingDirectory%/Tests/Unit/Domain/Repository/MenuRepositoryTest.php
ignoreErrors:
-
message: '#Call to an undefined static method TYPO3\\CMS\\Frontend\\ContentObject\\AbstractContentObject::__construct\(\).#'
path: %currentWorkingDirectory%/Classes/ContentObject/*
-
message: '#Property TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController::\$id \(int\) does not accept string.#'
path: %currentWorkingDirectory%/Tests/Functional/Compiler/LanguageMenuCompilerTest.php
-
message: '#Call to an undefined method TYPO3\\CMS\\Core\\TypoScript\\FrontendTypoScript::getConfigArray\(\).#'
path: %currentWorkingDirectory%/Classes/CacheHelper.php
-
message: '#Instantiated class TYPO3\\CMS\\Core\\Cache\\CacheDataCollector not found.#'
-
message: '#Instantiated class TYPO3\\CMS\\Core\\Cache\\CacheTag not found.#'
24 changes: 2 additions & 22 deletions Build/phpstan13.neon
Original file line number Diff line number Diff line change
@@ -1,27 +1,7 @@
includes:
- phpstan-baseline13.neon
parameters:
level: 5

paths:
- %currentWorkingDirectory%/Classes
- %currentWorkingDirectory%/Tests
excludePaths:
- %currentWorkingDirectory%/Tests/Unit/Domain/Repository/MenuRepositoryTest.php
ignoreErrors:
-
message: '#Call to an undefined method TYPO3\\CMS\\Core\\Site\\Entity\\SiteLanguage::getTwoLetterIsoCode\(\).#'
path: %currentWorkingDirectory%/Classes/Compiler/LanguageMenuCompiler.php
-
message: '#Access to undefined constant TYPO3\\CMS\\Core\\Domain\\Repository\\PageRepository::DOKTYPE_RECYCLER.#'
path: %currentWorkingDirectory%/Classes/Domain/Repository/MenuRepository.php
-
message: '#Access to undefined constant TYPO3\\CMS\\Core\\Domain\\Repository\\PageRepository::DOKTYPE_RECYCLER.#'
path: %currentWorkingDirectory%/Tests/Unit/Domain/Repository/MenuRepositoryTest.php
-
message: '#.*get_cache_timeout\(\).*#'
path: %currentWorkingDirectory%/Classes/CacheHelper.php
-
message: '#Call to an undefined static method TYPO3\\CMS\\Frontend\\ContentObject\\AbstractContentObject::__construct\(\).#'
path: %currentWorkingDirectory%/Classes/ContentObject/*
-
message: '#Property TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController::\$id \(int\) does not accept string.#'
path: %currentWorkingDirectory%/Tests/Functional/Compiler/LanguageMenuCompilerTest.php
7 changes: 7 additions & 0 deletions Build/phpstan14.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
includes:
- phpstan-baseline14.neon
parameters:
level: 5

paths:
- %currentWorkingDirectory%/Classes
8 changes: 4 additions & 4 deletions Build/testing-docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ services:
set -x
fi
php -v | grep '^PHP';
if [ ${TYPO3} -eq 11 ]; then
composer require typo3/cms-install:^11.5 typo3/cms-fluid-styled-content:^11.5 --dev -W --no-progress --no-interaction
composer prepare-tests
elif [ ${TYPO3} -eq 12 ]; then
if [ ${TYPO3} -eq 12 ]; then
composer require typo3/cms-install:^12.4 typo3/cms-fluid-styled-content:^12.4 --dev -W --no-progress --no-interaction
composer prepare-tests
elif [ ${TYPO3} -eq 13 ]; then
composer require typo3/cms-install:^13.4 typo3/cms-fluid-styled-content:^13.4 --dev -W --no-progress --no-interaction
composer prepare-tests
else
composer install --no-progress --no-interaction
composer prepare-tests
Expand Down
Loading