From 90985b08b151a4c193c809c1564bcd40c4ffb1df Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 2 Jul 2024 18:07:03 +0200 Subject: [PATCH] Raise to TYPO3 v13.2 --- .github/workflows/ci.yaml | 8 ++++---- Documentation/Changelog/3.0.0.rst | 4 ++-- Documentation/Maintenance/v11.rst | 8 -------- Documentation/Maintenance/v12.rst | 4 ++++ Tests/Functional/Typo3FeaturesTest.php | 14 ++++++++++++-- composer.json | 12 ++++++------ phpstan-baseline.neon | 6 ++++++ phpstan.neon | 4 ++-- 8 files changed, 36 insertions(+), 24 deletions(-) delete mode 100644 Documentation/Maintenance/v11.rst create mode 100644 Documentation/Maintenance/v12.rst diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7c44156..168f9dc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -114,10 +114,10 @@ jobs: typo3-version: '^12.4' - db-version: '8' php-version: '8.2' - typo3-version: '13.1' + typo3-version: '^13.2' - db-version: '8' php-version: '8.3' - typo3-version: '13.1' + typo3-version: '^13.2' steps: - uses: actions/checkout@v3 @@ -167,9 +167,9 @@ jobs: - php-version: '8.3' typo3-version: '^12.4' - php-version: '8.2' - typo3-version: '13.1' + typo3-version: '^13.2' - php-version: '8.3' - typo3-version: '13.1' + typo3-version: '^13.2' steps: - uses: actions/checkout@v3 diff --git a/Documentation/Changelog/3.0.0.rst b/Documentation/Changelog/3.0.0.rst index 4ec15f2..cfb6938 100644 --- a/Documentation/Changelog/3.0.0.rst +++ b/Documentation/Changelog/3.0.0.rst @@ -4,7 +4,7 @@ Breaking -------- -* Support TYPO3 v13.1, drop v11. +* Drop support for TYPO3 v11. We only support last two TYPO3 versions. * Drop `ext_emconf.php` this probably will remove support for none composer setups. @@ -12,7 +12,7 @@ Breaking Features -------- -* Add Support for TYPO3 v13.1. +* Add Support for TYPO3 v13. Fixes ----- diff --git a/Documentation/Maintenance/v11.rst b/Documentation/Maintenance/v11.rst deleted file mode 100644 index 71e7885..0000000 --- a/Documentation/Maintenance/v11.rst +++ /dev/null @@ -1,8 +0,0 @@ -V11 -=== - -Remove TCA fallback wrapped in version constraint in: - -- ``Configuration/TCA/tx_tracking_pageview.php`` - -- ``Configuration/TCA/tx_tracking_recordview.php`` diff --git a/Documentation/Maintenance/v12.rst b/Documentation/Maintenance/v12.rst new file mode 100644 index 0000000..42a1242 --- /dev/null +++ b/Documentation/Maintenance/v12.rst @@ -0,0 +1,4 @@ +V12 +=== + +Remove `new DataHandler()` calls. diff --git a/Tests/Functional/Typo3FeaturesTest.php b/Tests/Functional/Typo3FeaturesTest.php index 662f935..01566c6 100644 --- a/Tests/Functional/Typo3FeaturesTest.php +++ b/Tests/Functional/Typo3FeaturesTest.php @@ -56,7 +56,7 @@ protected function tearDown(): void #[Test] public function copyContainingRecords(): void { - $dataHandler = new DataHandler(); + $dataHandler = $this->createDataHandler(); $dataHandler->start([], [ 'pages' => [ 1 => [ @@ -76,7 +76,7 @@ public function copyContainingRecords(): void #[Test] public function copyCustomTablesViaDataHandler(): void { - $dataHandler = new DataHandler(); + $dataHandler = $this->createDataHandler(); $dataHandler->copyWhichTables = 'pages,tx_tracking_pageview,tx_tracking_recordview'; $dataHandler->start([], [ 'pages' => [ @@ -92,4 +92,14 @@ public function copyCustomTablesViaDataHandler(): void 'EXT:tracking/Tests/Functional/ExpectedResults/Typo3FeaturesTest/CopyPasteContainingRecords.csv' ); } + + private function createDataHandler(): DataHandler + { + // Prior TYPO3 v13.2 + if ($this->has(DataHandler::class) === false) { + return new DataHandler(); + } + + return $this->get(DataHandler::class); + } } diff --git a/composer.json b/composer.json index 9d05c7a..b3e1211 100644 --- a/composer.json +++ b/composer.json @@ -28,15 +28,15 @@ "require": { "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "ext-mbstring": "*", - "doctrine/dbal": "^2.12 || ^3.3 || 4.0.0-RC2", + "doctrine/dbal": "^2.12 || ^3.3 || ^4.0", "psr/http-message": "^1.0", "psr/http-server-handler": "^1.0", "psr/http-server-middleware": "^1.0", "symfony/console": "^5.2 || ^6.1 || ^7.0", "symfony/expression-language": "^5.2 || ^6.1 || ^7.0", - "typo3/cms-backend": "^12.4 || ^13.1", - "typo3/cms-core": "^12.4 || ^13.1", - "typo3/cms-dashboard": "^12.4 || ^13.1" + "typo3/cms-backend": "^12.4 || ^13.2", + "typo3/cms-core": "^12.4 || ^13.2", + "typo3/cms-dashboard": "^12.4 || ^13.2" }, "require-dev": { "codappix/typo3-php-datasets": "^1.5", @@ -45,8 +45,8 @@ "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^10.1", - "saschaegerer/phpstan-typo3": "dev-add-typo3-13_1-support", - "typo3/testing-framework": "^8.0" + "saschaegerer/phpstan-typo3": "^1.10", + "typo3/testing-framework": "^8.0.9" }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e69de29..89f0e2d 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -0,0 +1,6 @@ +parameters: + ignoreErrors: + - + message: "#^Class TYPO3\\\\CMS\\\\Core\\\\DataHandling\\\\DataHandler constructor invoked with 0 parameters, 14 required\\.$#" + count: 1 + path: Tests/Functional/Typo3FeaturesTest.php diff --git a/phpstan.neon b/phpstan.neon index 29bc899..dc230e4 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -5,7 +5,7 @@ parameters: paths: - Classes - Tests - checkMissingIterableValueType: false - reportUnmatchedIgnoredErrors: true + reportUnmatchedIgnoredErrors: false ignoreErrors: + - identifier: missingType.iterableValue - '#^Variable \$_EXTKEY might not be defined\.$#'