Skip to content

Commit

Permalink
Add PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sypets committed Oct 28, 2024
1 parent 6fc0d3b commit 0cdb59b
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
# rest matrix jobs be be executed anyway.
fail-fast: true
matrix:
php: [ '8.2', '8.3' ]
php: [ '8.2', '8.4' ]
minMax: [ 'composerInstallMax' ]
steps:
- name: "Checkout"
Expand Down
4 changes: 2 additions & 2 deletions Build/Scripts/runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

# config
SUPPORTED_PHP_VERSIONS="8.1|8.2|8.3|8.4"
DEFAULT_PHP_VERSION="8.3"
DEFAULT_PHP_VERSION="8.4"
PHP_VERSION="${DEFAULT_PHP_VERSION}"
DEFAULT_PHP_PLATFORM_VERSION="8.3.0"
DEFAULT_PHP_PLATFORM_VERSION="8.4.0"


# Function to write a .env file in Build/testing-docker/local
Expand Down
25 changes: 22 additions & 3 deletions Build/phpstan/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@ includes:
# regenerate baseline with: Build/Scripts/runTests.sh -s phpstanGenerateBaseline
#- phpstan-baseline.neon
#- ../../.Build/vendor/jangregor/phpstan-prophecy/extension.neon
- ../../.Build/vendor/bnf/phpstan-psr-container/extension.neon
- ../../.Build/vendor/friendsoftypo3/phpstan-typo3/extension.neon
- ../../.Build/vendor/phpstan/phpstan-phpunit/extension.neon
- ../../.Build/vendor/phpstan/phpstan-phpunit/rules.neon

#services:
# -
# class: TYPO3\CMS\PHPStan\Rules\Classes\UnneededInstanceOfRule
# arguments:
# # treatPhpDocTypesAsCertain is explicitly disabled as long as we have ignored errors
# # in our baseline, as that we MUST not trust doc types 100%.
# # We can switch to the global parameter `%treatPhpDocTypesAsCertain%` once that's fixed.
# treatPhpDocTypesAsCertain: false
# tags:
# - phpstan.rules.rule

parameters:
# Use local cache dir instead of /tmp
Expand All @@ -14,12 +29,16 @@ parameters:
level: 6

paths:
- ../../Classes
- ../../Classes/Util
#- ../../Tests
scanDirectories:
- ../../.Build/vendor
#scanDirectories:
# - ../../.Build/vendor

excludePaths:
- ../../Classes/Hooks/DataHandlerHook.php
- ../../Classes/Command/CheckLinksCommand.php

treatPhpDocTypesAsCertain: false
#featureToggles:
# nodeConnectingVisitorCompatibility: false

10 changes: 2 additions & 8 deletions Build/testing-docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ services:
if [ ${PHP_VERSION} == "8.0" ]; then
composer req --dev typo3/cms-core:"dev-main" \
typo3/cms-backend:"dev-main" \
typo3/cms-frontend:"dev-main" \
typo3/cms-extbase:"dev-main" \
typo3/cms-fluid:"dev-main" \
typo3/cms-recordlist:"dev-main"
typo3/cms-fluid:"dev-main"
fi
composer config --unset platform.php;
composer update --no-progress --no-interaction;
Expand All @@ -96,10 +93,7 @@ services:
if [ ${PHP_VERSION} == "8.0" ]; then
composer req --dev typo3/cms-core:"dev-main" \
typo3/cms-backend:"dev-main" \
typo3/cms-frontend:"dev-main" \
typo3/cms-extbase:"dev-main" \
typo3/cms-fluid:"dev-main" \
typo3/cms-recordlist:"dev-main"
typo3/cms-fluid:"dev-main"
fi
composer config platform.php ${PHP_VERSION}.0;
composer update --prefer-lowest --no-progress --no-interaction;
Expand Down
4 changes: 2 additions & 2 deletions Classes/Util/TcaUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public static function getFlexformFieldsWithConfig(string $table, string $field,
$results = [];

$flexFormTools = GeneralUtility::makeInstance(FlexFormTools::class);
$flexFormTools->cleanFlexFormXML($table, $field, $row);
$flexformArray = $flexFormTools->cleanFlexFormXML;
$cleanedFlexformString = $flexFormTools->cleanFlexFormXML($table, $field, $row);
$flexformArray = GeneralUtility::xml2array($cleanedFlexformString);

if (!($flexformArray['data'] ?? false)) {
return [];
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/AbstractFunctional.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ abstract class AbstractFunctional extends FunctionalTestCase
protected array $coreExtensionsToLoad = [
'backend',
'fluid',
'info',
//'info',
'install'
];
protected array $testExtensionsToLoad = [
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,19 @@
}
},
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"php": "^8.1",
"typo3/cms-backend": "^12.4.1 || ^13.4",
"typo3/cms-core": "^12.4.1 || ^13.4",
"typo3/cms-fluid": "^12.4.1 || ^13.4"
},
"require-dev": {
"bnf/phpstan-psr-container": "^1.0.1",
"friendsofphp/php-cs-fixer": "^3.2",
"friendsoftypo3/phpstan-typo3": "^0.9.0",
"phpstan/phpdoc-parser": "^1.30.0",
"phpstan/phpstan": "^1.8.2",
"phpunit/phpunit": "^9.5.20",
"ssch/typo3-rector": "^1.2",
"typo3/testing-framework": "^7.0.2"
"phpstan/phpstan-phpunit": "^1.0.0",
"typo3/testing-framework": "^7 || ^8"
},
"suggest": {
"sypets/page-callouts": "^3.0.0"
Expand Down

0 comments on commit 0cdb59b

Please sign in to comment.