From aa0558673748adfa840916b05609cca7715af3e2 Mon Sep 17 00:00:00 2001 From: Achim Fritz Date: Thu, 28 May 2026 08:10:32 +0200 Subject: [PATCH 1/6] !!![TASK] use ServerRequestInterface --- Classes/Provider/NullProxyProvider.php | 4 ++-- Classes/Provider/ProxyProviderInterface.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Classes/Provider/NullProxyProvider.php b/Classes/Provider/NullProxyProvider.php index 9b9c20d..6678440 100755 --- a/Classes/Provider/NullProxyProvider.php +++ b/Classes/Provider/NullProxyProvider.php @@ -17,7 +17,7 @@ * The TYPO3 project - inspiring people to share! */ -use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ServerRequestInterface; class NullProxyProvider implements ProxyProviderInterface { @@ -30,7 +30,7 @@ public function isActive(): bool return false; } - public function shouldRequestBeMarkedAsCached(RequestInterface $request): bool + public function shouldRequestBeMarkedAsCached(ServerRequestInterface $request): bool { return false; } diff --git a/Classes/Provider/ProxyProviderInterface.php b/Classes/Provider/ProxyProviderInterface.php index 595f32e..962fad9 100755 --- a/Classes/Provider/ProxyProviderInterface.php +++ b/Classes/Provider/ProxyProviderInterface.php @@ -17,7 +17,7 @@ * The TYPO3 project - inspiring people to share! */ -use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ServerRequestInterface; /** * The interface to be called from the CacheBackend. @@ -27,5 +27,5 @@ interface ProxyProviderInterface public function flushCacheForUrls(array $urls): void; public function flushAllUrls(array $urls = []): void; public function isActive(): bool; - public function shouldRequestBeMarkedAsCached(RequestInterface $request): bool; + public function shouldRequestBeMarkedAsCached(ServerRequestInterface $request): bool; } From fc93a17ee874d46e54a60ad8398e3f5bbd568453 Mon Sep 17 00:00:00 2001 From: Achim Fritz Date: Thu, 28 May 2026 08:25:35 +0200 Subject: [PATCH 2/6] [TASK] adapt CI for TYPO3 13/14 only --- .github/workflows/ci.yml | 37 ++++++++------------------ Build/php-cs-fixer.php | 6 +++++ Build/phpstan-baseline-11.neon | 26 ------------------ Build/phpstan-baseline-12.neon | 6 ----- Build/phpstan-baseline-13.neon | 31 --------------------- Build/{phpstan12.neon => phpstan.neon} | 2 -- Build/phpstan11.neon | 11 -------- Build/phpstan13.neon | 10 ------- composer.json | 10 ++++--- 9 files changed, 23 insertions(+), 116 deletions(-) delete mode 100644 Build/phpstan-baseline-11.neon delete mode 100644 Build/phpstan-baseline-12.neon delete mode 100644 Build/phpstan-baseline-13.neon rename Build/{phpstan12.neon => phpstan.neon} (70%) delete mode 100644 Build/phpstan11.neon delete mode 100644 Build/phpstan13.neon diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a719463..161f006 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,14 +13,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [ '8.1', '8.2'] - TYPO3: ['11', '12' ] - include: - - TYPO3: '13' - php: '8.3' + php: [ '8.2', '8.5'] + TYPO3: ['13', '14' ] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up PHP Version uses: shivammathur/setup-php@v2 @@ -29,29 +26,17 @@ jobs: tools: composer:v2 - name: Composer validate run: composer validate - - name: Install composer dependencies TYPO3 13 - if: matrix.TYPO3 == '13' + - name: Install composer dependencies TYPO3 14 + if: matrix.TYPO3 == '14' run: | composer install --no-progress --no-interaction - - name: Install composer dependencies TYPO3 12 - if: matrix.TYPO3 == '12' - run: | - composer require typo3/cms-core:^12.4 --no-progress --no-interaction --dev -W - - name: Install composer dependencies TYPO3 11 - if: matrix.TYPO3 == '11' - run: | - composer require typo3/cms-core:^11.5 --no-progress --no-interaction --dev -W - - name: Phpstan 11 - if: matrix.TYPO3 == '11' - run: .Build/bin/phpstan analyze -c Build/phpstan11.neon - - name: Phpstan 12 - if: matrix.TYPO3 == '12' - run: .Build/bin/phpstan analyze -c Build/phpstan12.neon - - name: Phpstan 13 + - name: Install composer dependencies TYPO3 13 if: matrix.TYPO3 == '13' - run: .Build/bin/phpstan analyze -c Build/phpstan13.neon - - name: Phpcsfix TYPO3 12 and 13 - if: matrix.TYPO3 != '11' + run: | + composer require typo3/cms-core:^13.4 --no-progress --no-interaction --dev -W + - name: Phpstan + run: .Build/bin/phpstan analyze -c Build/phpstan.neon + - name: Phpcsfix run: .Build/bin/php-cs-fixer fix --config=Build/php-cs-fixer.php --dry-run --stop-on-violation --using-cache=no diff --git a/Build/php-cs-fixer.php b/Build/php-cs-fixer.php index 6ee0307..16494b6 100644 --- a/Build/php-cs-fixer.php +++ b/Build/php-cs-fixer.php @@ -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; diff --git a/Build/phpstan-baseline-11.neon b/Build/phpstan-baseline-11.neon deleted file mode 100644 index 38cf700..0000000 --- a/Build/phpstan-baseline-11.neon +++ /dev/null @@ -1,26 +0,0 @@ -parameters: - ignoreErrors: - - - message: "#^Access to constant ERROR on an unknown class TYPO3\\\\CMS\\\\Core\\\\Type\\\\ContextualFeedbackSeverity\\.$#" - count: 1 - path: ../Classes/Controller/ManagementController.php - - - - message: "#^Access to constant OK on an unknown class TYPO3\\\\CMS\\\\Core\\\\Type\\\\ContextualFeedbackSeverity\\.$#" - count: 2 - path: ../Classes/Controller/ManagementController.php - - - - message: "#^Access to constant WARNING on an unknown class TYPO3\\\\CMS\\\\Core\\\\Type\\\\ContextualFeedbackSeverity\\.$#" - count: 1 - path: ../Classes/Controller/ManagementController.php - - - - message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Backend\\\\Template\\\\ModuleTemplate\\:\\:renderResponse\\(\\)\\.$#" - count: 1 - path: ../Classes/Controller/ManagementController.php - - - - message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\View\\\\ViewInterface\\:\\:setTemplateRootPaths\\(\\)\\.$#" - count: 1 - path: ../Classes/Controller/ManagementController.php diff --git a/Build/phpstan-baseline-12.neon b/Build/phpstan-baseline-12.neon deleted file mode 100644 index 4b906d5..0000000 --- a/Build/phpstan-baseline-12.neon +++ /dev/null @@ -1,6 +0,0 @@ -parameters: - ignoreErrors: - - - message: "#^Call to an undefined method TYPO3Fluid\\\\Fluid\\\\View\\\\ViewInterface\\:\\:setTemplateRootPaths\\(\\)\\.$#" - count: 1 - path: ../Classes/Controller/ManagementController.php diff --git a/Build/phpstan-baseline-13.neon b/Build/phpstan-baseline-13.neon deleted file mode 100644 index 75268c4..0000000 --- a/Build/phpstan-baseline-13.neon +++ /dev/null @@ -1,31 +0,0 @@ -parameters: - ignoreErrors: - - - message: "#^Access to undefined constant TYPO3\\\\CMS\\\\Core\\\\Messaging\\\\AbstractMessage\\:\\:ERROR\\.$#" - count: 1 - path: ../Classes/Controller/ManagementController.php - - - - message: "#^Access to undefined constant TYPO3\\\\CMS\\\\Core\\\\Messaging\\\\AbstractMessage\\:\\:OK\\.$#" - count: 2 - path: ../Classes/Controller/ManagementController.php - - - - message: "#^Access to undefined constant TYPO3\\\\CMS\\\\Core\\\\Messaging\\\\AbstractMessage\\:\\:WARNING\\.$#" - count: 2 - path: ../Classes/Controller/ManagementController.php - - - - message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Backend\\\\Template\\\\ModuleTemplate\\:\\:renderContent\\(\\)\\.$#" - count: 1 - path: ../Classes/Controller/ManagementController.php - - - - message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Backend\\\\Template\\\\ModuleTemplate\\:\\:setContent\\(\\)\\.$#" - count: 1 - path: ../Classes/Controller/ManagementController.php - - - - message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Core\\\\View\\\\ViewInterface\\|TYPO3Fluid\\\\Fluid\\\\View\\\\ViewInterface\\:\\:setTemplateRootPaths\\(\\)\\.$#" - count: 1 - path: ../Classes/Controller/ManagementController.php diff --git a/Build/phpstan12.neon b/Build/phpstan.neon similarity index 70% rename from Build/phpstan12.neon rename to Build/phpstan.neon index 4077d1c..1b5e587 100644 --- a/Build/phpstan12.neon +++ b/Build/phpstan.neon @@ -1,5 +1,3 @@ -includes: - - phpstan-baseline-12.neon parameters: level: 5 diff --git a/Build/phpstan11.neon b/Build/phpstan11.neon deleted file mode 100644 index 4b7c412..0000000 --- a/Build/phpstan11.neon +++ /dev/null @@ -1,11 +0,0 @@ -includes: - - phpstan-baseline-11.neon -parameters: - level: 5 - - paths: - - %currentWorkingDirectory%/Classes - - excludes_analyse: - - %currentWorkingDirectory%/Classes/Listener/AfterCacheIsPersisted.php - diff --git a/Build/phpstan13.neon b/Build/phpstan13.neon deleted file mode 100644 index 03018fe..0000000 --- a/Build/phpstan13.neon +++ /dev/null @@ -1,10 +0,0 @@ -includes: - - phpstan-baseline-13.neon -parameters: - level: 5 - - paths: - - %currentWorkingDirectory%/Classes - - ignoreErrors: - diff --git a/composer.json b/composer.json index 9689712..1d5b674 100644 --- a/composer.json +++ b/composer.json @@ -26,12 +26,14 @@ }, "require": { "php": "^8.2", - "typo3/cms-backend": "^13.4 || ^14.0", - "typo3/cms-frontend": "^13.4 || ^14.0" + "typo3/cms-backend": "^13.4 || ^14.3", + "typo3/cms-extbase": "^13.4 || ^14.3", + "typo3/cms-frontend": "^13.4 || ^14.3", + "typo3/cms-install": "^13.4 || ^14.3" }, "require-dev": { - "saschaegerer/phpstan-typo3": "^1.10", - "typo3/coding-standards": "^0.7 || ^0.8", + "phpstan/phpstan": "^1.10", + "typo3/coding-standards": "^0.8", "typo3/tailor": "^1.0" }, "extra": { From 372ff068b220abbd401b07a1f0649ecd987fce99 Mon Sep 17 00:00:00 2001 From: Achim Fritz Date: Thu, 28 May 2026 08:33:55 +0200 Subject: [PATCH 3/6] !!![TASK] raise PHP Version to ^8.3 --- .github/workflows/ci.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 161f006..5e45008 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [ '8.2', '8.5'] + php: [ '8.3', '8.5'] TYPO3: ['13', '14' ] steps: - name: Checkout diff --git a/composer.json b/composer.json index 1d5b674..d6e3808 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ } }, "require": { - "php": "^8.2", + "php": "^8.3", "typo3/cms-backend": "^13.4 || ^14.3", "typo3/cms-extbase": "^13.4 || ^14.3", "typo3/cms-frontend": "^13.4 || ^14.3", From 70c20ff4858dd404e7ce78833ab0cc67202193ed Mon Sep 17 00:00:00 2001 From: Achim Fritz Date: Thu, 28 May 2026 08:38:00 +0200 Subject: [PATCH 4/6] [TASK] adapt composer.json to prevent deprecations in v14 --- composer.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d6e3808..a9cecc3 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,11 @@ "extension-key": "proxycachemanager", "cms-package-dir": "{$vendor-dir}/typo3/cms", "app-dir": ".Build", - "web-dir": ".Build/Web" + "web-dir": ".Build/Web", + "version": "4.1.2", + "Package": { + "providesPackages": {} + } } }, "autoload": { From a853627a4a3b6f6403fb12ec84efa877d21804e5 Mon Sep 17 00:00:00 2001 From: Achim Fritz Date: Thu, 28 May 2026 08:45:51 +0200 Subject: [PATCH 5/6] [BUGFIX] href key changed to endpoint s. https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/14.3/Deprecation-109107-CacheActionHrefKey.html#deprecation-109107-cacheaction-key-href --- Classes/Listener/ModifyClearCacheActions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Classes/Listener/ModifyClearCacheActions.php b/Classes/Listener/ModifyClearCacheActions.php index 41f047d..9ba5a9e 100644 --- a/Classes/Listener/ModifyClearCacheActions.php +++ b/Classes/Listener/ModifyClearCacheActions.php @@ -21,6 +21,7 @@ use B13\Proxycachemanager\ProxyConfiguration; use TYPO3\CMS\Backend\Backend\Event\ModifyClearCacheActionsEvent; use TYPO3\CMS\Backend\Routing\UriBuilder; +use TYPO3\CMS\Core\Information\Typo3Version; use TYPO3\CMS\Core\Utility\GeneralUtility; class ModifyClearCacheActions @@ -41,9 +42,12 @@ public function __invoke(ModifyClearCacheActionsEvent $event): void 'id' => 'clearProxyCache', 'title' => 'LLL:EXT:proxycachemanager/Resources/Private/Language/locallang.xlf:menuitem.title', 'description' => 'LLL:EXT:proxycachemanager/Resources/Private/Language/locallang.xlf:menuitem.description', - 'href' => (string)$uriBuilder->buildUriFromRoute('ajax_proxy_flushcaches'), + 'endpoint' => (string)$uriBuilder->buildUriFromRoute('ajax_proxy_flushcaches'), 'iconIdentifier' => 'actions-system-cache-clear-impact-medium', ]; + if ((new Typo3Version())->getMajorVersion() < 14) { + $item['href'] = $item['endpoint']; + } $event->addCacheAction($item); } } From f8487f194c7a7c873971453af6649e9d0016455a Mon Sep 17 00:00:00 2001 From: Achim Fritz Date: Thu, 28 May 2026 08:46:20 +0200 Subject: [PATCH 6/6] [TASK] archive composer.lock file in CI --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e45008..4cbcdf8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,4 +39,9 @@ jobs: run: .Build/bin/phpstan analyze -c Build/phpstan.neon - name: Phpcsfix run: .Build/bin/php-cs-fixer fix --config=Build/php-cs-fixer.php --dry-run --stop-on-violation --using-cache=no - + - name: Archive composer.lock + uses: actions/upload-artifact@v6 + if: always() + with: + name: composer.lock-${{ matrix.php }}-${{ matrix.TYPO3 }} + path: composer.lock