From 095451e44338e44c908c9e61c4d3e2d1cb91fa85 Mon Sep 17 00:00:00 2001 From: Daniel Gohlke Date: Mon, 26 Jan 2026 11:56:19 +0100 Subject: [PATCH 1/2] [TASK] Allow removed EOL PHP 8.1 in tests --- .github/workflows/ci.yaml | 10 ++++++++-- shell.nix | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cfec80b7..cc8346eb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -107,7 +107,10 @@ jobs: - uses: cachix/install-nix-action@v17 with: - nix_path: nixpkgs=channel:nixos-unstable + nix_path: nixpkgs=channel:nixos-unstable:phps=https://github.com/fossar/nix-phps/archive/master.tar.gz + extra_nix_config: | + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE= + substituters = https://cache.nixos.org/ https://fossar.cachix.org - name: Run Unit Tests PHP8.1 run: nix-shell --arg phpVersion \"php81\" --pure --run project-test-unit @@ -142,7 +145,10 @@ jobs: - uses: cachix/install-nix-action@v17 with: - nix_path: nixpkgs=channel:nixos-unstable + nix_path: nixpkgs=channel:nixos-unstable:phps=https://github.com/fossar/nix-phps/archive/master.tar.gz + extra_nix_config: | + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE= + substituters = https://cache.nixos.org/ https://fossar.cachix.org - name: Run Acceptance Tests PHP8.1 run: nix-shell --arg phpVersion \"php81\" --pure --run project-test-acceptance diff --git a/shell.nix b/shell.nix index 425e64c1..04c06ea0 100644 --- a/shell.nix +++ b/shell.nix @@ -1,10 +1,16 @@ { pkgs ? import { } + ,php81 ? import + ,php85 ? import (fetchTarball "https://github.com/piotrkwiecinski/nixpkgs/archive/1c614d75004b9eb1ecda6ddeb959c4f544403de5.tar.gz") {} ,phpVersion ? "php81" }: let - php = pkgs.${phpVersion}.buildEnv { + phpVersionPkgs = + if (phpVersion == "php85") then php85.${phpVersion} + else if (phpVersion == "php81") then php81.packages.x86_64-linux.${phpVersion} + else pkgs.${phpVersion}; + php = phpVersionPkgs.buildEnv { extensions = { enabled, all }: enabled ++ (with all; [ xdebug ]); @@ -14,7 +20,7 @@ let memory_limit = 4G ''; }; - inherit(pkgs."${phpVersion}Packages") composer; + inherit(phpVersionPkgs.packages) composer; projectInstall = pkgs.writeShellApplication { name = "project-install"; From b6ed90695b210ab0f47bae984cbba4eaccdc70ed Mon Sep 17 00:00:00 2001 From: Daniel Gohlke Date: Mon, 26 Jan 2026 11:58:33 +0100 Subject: [PATCH 2/2] [BUGFIX] Changes after updating php-cs-fixer --- Classes/Controller/EventController.php | 4 ++-- Classes/Domain/Model/EventDate.php | 4 ++-- Classes/Domain/Model/PriceCategory.php | 4 ++-- Classes/Domain/Repository/CategoryRepository.php | 4 ++-- Classes/Domain/Repository/EventRepository.php | 10 +++++----- .../SwitchableControllerActionsPluginUpdater.php | 4 ++-- .../tx_cartevents_domain_model_event.php | 8 ++++---- .../TCA/Overrides/tx_kesearch_indexerconfig.php | 4 ++-- ext_localconf.php | 16 ++++++++-------- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Classes/Controller/EventController.php b/Classes/Controller/EventController.php index 8385330d..12ae8688 100644 --- a/Classes/Controller/EventController.php +++ b/Classes/Controller/EventController.php @@ -223,8 +223,8 @@ protected function createDemandObjectFromSettings(string $type, array $settings) EventDemand::class ); - if (isset($settings['view'][$type]) && - is_array($settings['view'][$type]) + if (isset($settings['view'][$type]) + && is_array($settings['view'][$type]) ) { // Use default TypoScript settings for plugin configuration $limit = (int)$settings['view'][$type]['limit']; diff --git a/Classes/Domain/Model/EventDate.php b/Classes/Domain/Model/EventDate.php index 5bcacc1b..1cb6bc36 100644 --- a/Classes/Domain/Model/EventDate.php +++ b/Classes/Domain/Model/EventDate.php @@ -234,8 +234,8 @@ public function getBestSpecialPrice(array $frontendUserGroupIds = []): ?SpecialP if ($this->specialPrices) { foreach ($this->specialPrices as $specialPrice) { if (!isset($bestSpecialPrice) || $specialPrice->getPrice() < $bestSpecialPrice->getPrice()) { - if (!$specialPrice->getFrontendUserGroup() || - in_array($specialPrice->getFrontendUserGroup()->getUid(), $frontendUserGroupIds) + if (!$specialPrice->getFrontendUserGroup() + || in_array($specialPrice->getFrontendUserGroup()->getUid(), $frontendUserGroupIds) ) { $bestSpecialPrice = $specialPrice; } diff --git a/Classes/Domain/Model/PriceCategory.php b/Classes/Domain/Model/PriceCategory.php index 11bdcdb4..cd5085b1 100644 --- a/Classes/Domain/Model/PriceCategory.php +++ b/Classes/Domain/Model/PriceCategory.php @@ -142,8 +142,8 @@ public function getBestSpecialPrice(array $frontendUserGroupIds = []): ?SpecialP if ($this->specialPrices) { foreach ($this->specialPrices as $specialPrice) { if (!isset($bestSpecialPrice) || $specialPrice->getPrice() < $bestSpecialPrice->getPrice()) { - if (!$specialPrice->getFrontendUserGroup() || - in_array($specialPrice->getFrontendUserGroup()->getUid(), $frontendUserGroupIds) + if (!$specialPrice->getFrontendUserGroup() + || in_array($specialPrice->getFrontendUserGroup()->getUid(), $frontendUserGroupIds) ) { $bestSpecialPrice = $specialPrice; } diff --git a/Classes/Domain/Repository/CategoryRepository.php b/Classes/Domain/Repository/CategoryRepository.php index c175be5f..58d485ea 100644 --- a/Classes/Domain/Repository/CategoryRepository.php +++ b/Classes/Domain/Repository/CategoryRepository.php @@ -81,8 +81,8 @@ protected function buildSubcategories(array $categoriesArray, array $parentCateg foreach ($categoriesArray as $category) { if ($category['parent'] === $parentCategory['uid']) { $newCategory = $category; - $newCategory['subcategories'] = - $this->buildSubcategories($categoriesArray, $category); + $newCategory['subcategories'] + = $this->buildSubcategories($categoriesArray, $category); $categories[] = $newCategory; } } diff --git a/Classes/Domain/Repository/EventRepository.php b/Classes/Domain/Repository/EventRepository.php index c47ad616..53043504 100644 --- a/Classes/Domain/Repository/EventRepository.php +++ b/Classes/Domain/Repository/EventRepository.php @@ -86,12 +86,12 @@ protected function createOrderingsFromDemand(EventDemand $demand): array if (!empty($orderList)) { foreach ($orderList as $orderItem) { - [$orderField, $ascDesc] = - GeneralUtility::trimExplode(' ', $orderItem, true); + [$orderField, $ascDesc] + = GeneralUtility::trimExplode(' ', $orderItem, true); if ($ascDesc) { - $orderings[$orderField] = ((strtolower($ascDesc) === 'desc') ? - QueryInterface::ORDER_DESCENDING : - QueryInterface::ORDER_ASCENDING); + $orderings[$orderField] = ((strtolower($ascDesc) === 'desc') + ? QueryInterface::ORDER_DESCENDING + : QueryInterface::ORDER_ASCENDING); } else { $orderings[$orderField] = QueryInterface::ORDER_ASCENDING; } diff --git a/Classes/Updates/SwitchableControllerActionsPluginUpdater.php b/Classes/Updates/SwitchableControllerActionsPluginUpdater.php index dea4ea80..f44f75e3 100644 --- a/Classes/Updates/SwitchableControllerActionsPluginUpdater.php +++ b/Classes/Updates/SwitchableControllerActionsPluginUpdater.php @@ -153,8 +153,8 @@ protected function getMigrationRecords(): array protected function getTargetListType(string $sourceListType, string $switchableControllerActions): string { foreach (self::MIGRATION_SETTINGS as $setting) { - if ($setting['sourceListType'] === $sourceListType && - $setting['switchableControllerActions'] === $switchableControllerActions + if ($setting['sourceListType'] === $sourceListType + && $setting['switchableControllerActions'] === $switchableControllerActions ) { return $setting['targetListType']; } diff --git a/Configuration/TCA/Overrides/tx_cartevents_domain_model_event.php b/Configuration/TCA/Overrides/tx_cartevents_domain_model_event.php index 8b5a5a34..e2f9d3a0 100644 --- a/Configuration/TCA/Overrides/tx_cartevents_domain_model_event.php +++ b/Configuration/TCA/Overrides/tx_cartevents_domain_model_event.php @@ -59,9 +59,9 @@ // prepend category restriction at the beginning of foreign_table_where if (!empty($categoryRestriction)) { - $GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['category']['config']['foreign_table_where'] = $categoryRestriction . - $GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['category']['config']['foreign_table_where']; - $GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['categories']['config']['foreign_table_where'] = $categoryRestriction . - $GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['categories']['config']['foreign_table_where']; + $GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['category']['config']['foreign_table_where'] = $categoryRestriction + . $GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['category']['config']['foreign_table_where']; + $GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['categories']['config']['foreign_table_where'] = $categoryRestriction + . $GLOBALS['TCA']['tx_cartevents_domain_model_event']['columns']['categories']['config']['foreign_table_where']; } } diff --git a/Configuration/TCA/Overrides/tx_kesearch_indexerconfig.php b/Configuration/TCA/Overrides/tx_kesearch_indexerconfig.php index df6ba027..652cfd49 100644 --- a/Configuration/TCA/Overrides/tx_kesearch_indexerconfig.php +++ b/Configuration/TCA/Overrides/tx_kesearch_indexerconfig.php @@ -5,6 +5,6 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; if (ExtensionManagementUtility::isLoaded('ke_search')) { - $GLOBALS['TCA']['tx_kesearch_indexerconfig']['columns']['startingpoints_recursive']['displayCond'] .= - ',carteventsindexer,cartsingleeventindexer'; + $GLOBALS['TCA']['tx_kesearch_indexerconfig']['columns']['startingpoints_recursive']['displayCond'] + .= ',carteventsindexer,cartsingleeventindexer'; } diff --git a/ext_localconf.php b/ext_localconf.php index 9746107b..d036f989 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -78,26 +78,26 @@ // Cart Hooks -$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['cart']['CartEvents']['Form']['AddToCartFinisher'] = - AddToCartFinisher::class; +$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['cart']['CartEvents']['Form']['AddToCartFinisher'] + = AddToCartFinisher::class; // processDatamapClass Hook -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['cartevents_allowed'] = - DatamapDataHandlerHook::class; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['cartevents_allowed'] + = DatamapDataHandlerHook::class; // clearCachePostProc Hook -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['cartevents_clearcache'] = - DataHandler::class . '->clearCachePostProc'; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['cartevents_clearcache'] + = DataHandler::class . '->clearCachePostProc'; // register "cartevents:" namespace $GLOBALS['TYPO3_CONF_VARS']['SYS']['fluid']['namespaces']['cartevents'][] = 'Extcode\\CartEvents\\ViewHelpers'; // update wizard for slugs -$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['cartEventsSlugUpdater'] = - SlugUpdater::class; +$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['cartEventsSlugUpdater'] + = SlugUpdater::class; // translation overrides