From 7badce048dc30e5188e49635d08464280a41c359 Mon Sep 17 00:00:00 2001 From: Sven Petersen Date: Wed, 14 Feb 2024 20:25:53 +0100 Subject: [PATCH 1/3] [WIP] TYPO3 v12 compatibility --- README.md | 11 +---------- Tests/Functional/BaseTest.php | 4 ++-- .../Functional/ContentTypes/AccordionElementTest.php | 2 +- Tests/Functional/ContentTypes/BaseContentTypeTest.php | 2 +- .../Functional/ContentTypes/CardGroupElementTest.php | 2 +- .../Functional/ContentTypes/IconGroupElementTest.php | 2 +- Tests/Functional/ContentTypes/PanelElementTest.php | 2 +- Tests/Functional/ContentTypes/TabElementTest.php | 2 +- .../Functional/ContentTypes/TextColumnElementTest.php | 2 +- Tests/Functional/ContentTypes/TextIconElementTest.php | 2 +- .../Functional/ContentTypes/TextteaserElementTest.php | 2 +- Tests/Functional/ContentTypes/TimelineElementTest.php | 2 +- composer.json | 10 +++++----- 13 files changed, 18 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index d04b08e..528739e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ -![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2.svg) - [![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md) [![TYPO3 11](https://img.shields.io/badge/TYPO3-11-orange.svg)](https://get.typo3.org/version/11) +[![TYPO3 12](https://img.shields.io/badge/TYPO3-12-orange.svg)](https://get.typo3.org/version/11) [![CI Status](https://github.com/FriendsOfTYPO3Headless/headless_bootstrap_package/workflows/CI/badge.svg)](https://github.com/FriendsOfTYPO3Headless/headless_bootstrap_package/actions) [![Code Coverage Badge](https://github.com/FriendsOfTYPO3Headless/headless_bootstrap_package/blob/code-coverage-badge/badge.svg)](https://github.com/FriendsOfTYPO3Headless/headless_bootstrap_package/blob/code-coverage-badge/clover.xml) [![Total Downloads](http://poser.pugx.org/friendsoftypo3headless/headless-bootstrap-package/downloads)](https://packagist.org/packages/friendsoftypo3headless/headless-bootstrap-package) @@ -28,14 +27,6 @@ This Extension requires: - [EXT:bk2k/bootstrap-package](https://github.com/benjaminkott/bootstrap_package) in version at least 12.0 -## Compatibility - -The following table shows the compatibilty of this extension to the respective EXT:bootstrap_package versions. - -| | BP 13.x | BP 12.x | -|------|---------|---------| -| v2.x | ✔️ | ️ | -| v1.x | | ✔️ | ## TYPO3 Installation diff --git a/Tests/Functional/BaseTest.php b/Tests/Functional/BaseTest.php index bc70a0d..6e7fc93 100644 --- a/Tests/Functional/BaseTest.php +++ b/Tests/Functional/BaseTest.php @@ -16,11 +16,11 @@ abstract class BaseTest extends FunctionalTestCase { - protected $coreExtensionsToLoad = [ + protected array $coreExtensionsToLoad = [ 'install', ]; - protected $testExtensionsToLoad = [ + protected array $testExtensionsToLoad = [ 'typo3conf/ext/headless', 'typo3conf/ext/bootstrap_package', 'typo3conf/ext/headless_bootstrap_package', diff --git a/Tests/Functional/ContentTypes/AccordionElementTest.php b/Tests/Functional/ContentTypes/AccordionElementTest.php index b1c5caf..f5bb1f2 100644 --- a/Tests/Functional/ContentTypes/AccordionElementTest.php +++ b/Tests/Functional/ContentTypes/AccordionElementTest.php @@ -53,7 +53,7 @@ private function checkItems(array $contentElement): void foreach ($contentElement['content']['items'] as $item) { self::assertArrayHasKey('id', $item); self::assertEquals('Header', $item['header'], 'accordion item: header mismatch'); - self::assertEquals('

Link

', $item['bodytext']); + self::assertEquals('

Link

', $item['bodytext']); self::assertEquals('left', $item['mediaorient'], 'accordion item: mediaorient mismatch'); self::assertEquals(2, $item['imagecols'], 'accordion item: imagecols mismatch'); self::assertEquals(0, $item['imageZoom'], 'accordion item: imageZoom mismatch'); diff --git a/Tests/Functional/ContentTypes/BaseContentTypeTest.php b/Tests/Functional/ContentTypes/BaseContentTypeTest.php index ac179e5..687d977 100644 --- a/Tests/Functional/ContentTypes/BaseContentTypeTest.php +++ b/Tests/Functional/ContentTypes/BaseContentTypeTest.php @@ -189,7 +189,7 @@ public function checkBackgroundImageOptions(array $contentElement, string $paral */ public function checkTypoLinkField(array $typolinkConfig): void { - self::assertEquals('/page1?parameter=999&cHash=bfd4c1935d34c545ca918205373b0a42', $typolinkConfig['href'], 'typolink href mismatch'); + self::assertEquals('/page1?parameter=999&cHash=bfd4c1935d34c545ca918205373b0a42', $typolinkConfig['href'], 'typolink href mismatch'); self::assertEquals('LinkTitle', $typolinkConfig['title'], 'typolink title mismatch'); self::assertEquals('LinkClass', $typolinkConfig['class'], 'typolink class mismatch'); self::assertEquals('_blank', $typolinkConfig['target'], 'typolink target mismatch'); diff --git a/Tests/Functional/ContentTypes/CardGroupElementTest.php b/Tests/Functional/ContentTypes/CardGroupElementTest.php index 8f3395d..c1bfc1e 100644 --- a/Tests/Functional/ContentTypes/CardGroupElementTest.php +++ b/Tests/Functional/ContentTypes/CardGroupElementTest.php @@ -65,7 +65,7 @@ private function checkItems(array $contentElement): void self::assertEquals('Subheader', $item['subheader'], 'icon_set mismatch'); self::assertArrayNotHasKey('headerLayout', $item); self::assertArrayNotHasKey('headerPosition', $item); - self::assertEquals('

Link

', $item['bodytext']); + self::assertEquals('

Link

', $item['bodytext']); $assertConfig = $itemTestConfig[$key]; diff --git a/Tests/Functional/ContentTypes/IconGroupElementTest.php b/Tests/Functional/ContentTypes/IconGroupElementTest.php index fff8c18..cad9193 100644 --- a/Tests/Functional/ContentTypes/IconGroupElementTest.php +++ b/Tests/Functional/ContentTypes/IconGroupElementTest.php @@ -61,7 +61,7 @@ private function checkItems(array $contentElement): void self::assertCount(1, $contentElement['content']['items']); foreach ($contentElement['content']['items'] as $item) { - self::assertEquals('

Link

', $item['bodytext']); + self::assertEquals('

Link

', $item['bodytext']); self::assertEquals('Header', $item['header']); self::assertEquals('Subheader', $item['subheader']); diff --git a/Tests/Functional/ContentTypes/PanelElementTest.php b/Tests/Functional/ContentTypes/PanelElementTest.php index c83be72..a4a83eb 100644 --- a/Tests/Functional/ContentTypes/PanelElementTest.php +++ b/Tests/Functional/ContentTypes/PanelElementTest.php @@ -29,7 +29,7 @@ public function testPanelContentElement(): void // content element specific tests self::assertEquals('secondary', $contentElement['content']['panelClass'], 'panelClass mismatch'); - self::assertEquals('

Link

', $contentElement['content']['bodytext'], 'bodytext mismatch'); + self::assertEquals('

Link

', $contentElement['content']['bodytext'], 'bodytext mismatch'); $this->checkDisabledFields($contentElement); // general tests diff --git a/Tests/Functional/ContentTypes/TabElementTest.php b/Tests/Functional/ContentTypes/TabElementTest.php index d2a9780..cd06a68 100644 --- a/Tests/Functional/ContentTypes/TabElementTest.php +++ b/Tests/Functional/ContentTypes/TabElementTest.php @@ -52,7 +52,7 @@ private function checkItems(array $contentElement): void foreach ($contentElement['content']['items'] as $item) { self::assertArrayHasKey('id', $item); self::assertEquals('Header', $item['header'], 'accordion item: header mismatch'); - self::assertEquals('

Link

', $item['bodytext']); + self::assertEquals('

Link

', $item['bodytext']); self::assertEquals('left', $item['mediaorient']); self::assertEquals(2, $item['imagecols']); self::assertEquals(1, $item['imageZoom']); diff --git a/Tests/Functional/ContentTypes/TextColumnElementTest.php b/Tests/Functional/ContentTypes/TextColumnElementTest.php index b571ab1..e53014d 100644 --- a/Tests/Functional/ContentTypes/TextColumnElementTest.php +++ b/Tests/Functional/ContentTypes/TextColumnElementTest.php @@ -28,7 +28,7 @@ public function testTextcolumnContentElement(): void $contentElement = $fullTree['content']['colPos0'][7]; // content element specific tests - self::assertEquals('

Link

', $contentElement['content']['bodytext']); + self::assertEquals('

Link

', $contentElement['content']['bodytext']); // general tests $this->checkDefaultContentFields($contentElement, 8, 1, 'textcolumn', 0, 'SysCategory1Title,SysCategory2Title'); diff --git a/Tests/Functional/ContentTypes/TextIconElementTest.php b/Tests/Functional/ContentTypes/TextIconElementTest.php index 097757f..f402683 100644 --- a/Tests/Functional/ContentTypes/TextIconElementTest.php +++ b/Tests/Functional/ContentTypes/TextIconElementTest.php @@ -28,7 +28,7 @@ public function testTexticonContentElement(): void $contentElement = $fullTree['content']['colPos0'][18]; // content element specific tests - self::assertEquals('

Link

', $contentElement['content']['bodytext'], 'bodytext mismatch'); + self::assertEquals('

Link

', $contentElement['content']['bodytext'], 'bodytext mismatch'); self::assertArrayNotHasKey('flexform', $contentElement); $this->checkIcon($contentElement); diff --git a/Tests/Functional/ContentTypes/TextteaserElementTest.php b/Tests/Functional/ContentTypes/TextteaserElementTest.php index b5cc10a..cfd5f3b 100644 --- a/Tests/Functional/ContentTypes/TextteaserElementTest.php +++ b/Tests/Functional/ContentTypes/TextteaserElementTest.php @@ -28,7 +28,7 @@ public function testTextteaserContentElement(): void $contentElement = $fullTree['content']['colPos0'][8]; // content element specific tests - self::assertEquals('

Link

', $contentElement['content']['bodytext']); + self::assertEquals('

Link

', $contentElement['content']['bodytext']); self::assertEquals('Some teaser text', $contentElement['content']['teaser']); // general tests diff --git a/Tests/Functional/ContentTypes/TimelineElementTest.php b/Tests/Functional/ContentTypes/TimelineElementTest.php index f587ba1..1ec5bf5 100644 --- a/Tests/Functional/ContentTypes/TimelineElementTest.php +++ b/Tests/Functional/ContentTypes/TimelineElementTest.php @@ -53,7 +53,7 @@ private function checkItems(array $contentElement): void self::assertArrayHasKey('id', $item); self::assertEquals('2022-03-10 12:00:00', $item['date']); self::assertEquals('Header', $item['header'], 'accordion item: header mismatch'); - self::assertEquals('

Link

', $item['bodytext']); + self::assertEquals('

Link

', $item['bodytext']); $this->checkFileReferencesField($item, 'image'); } diff --git a/composer.json b/composer.json index 508487d..a6eeff4 100644 --- a/composer.json +++ b/composer.json @@ -24,10 +24,10 @@ } ], "require": { - "php": "^7.4 || ^8.0", - "bk2k/bootstrap-package": "^13.0", - "friendsoftypo3/headless": "^3.0.3", - "typo3/cms-core": "^11.5" + "php": "^8.1", + "bk2k/bootstrap-package": "^13.0 || ^14.0", + "friendsoftypo3/headless": "^4.2", + "typo3/cms-core": "^12.4" }, "require-dev": { "ext-json": "*", @@ -41,7 +41,7 @@ "phpunit/phpcov": "^8.2", "saschaegerer/phpstan-typo3": "^1.8.2", "typo3/coding-standards": "^0.5.0", - "typo3/testing-framework": "^6" + "typo3/testing-framework": "^7" }, "suggest": { "friendsoftypo3headless/headless-backendlayouts": "^1.0", From 49c710b501397287b93c61c723faf341639cfd4c Mon Sep 17 00:00:00 2001 From: Sven Petersen Date: Wed, 14 Feb 2024 20:28:16 +0100 Subject: [PATCH 2/3] [WIP] TYPO3 v12 compatibility --- .github/workflows/ci.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b56ff15..8f7189a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,8 +27,9 @@ jobs: fail-fast: false matrix: php-version: - - 7.4 - - 8.0 + - 8.1 + - 8.2 + - 8.3 code-quality: name: "Code quality checks" runs-on: ubuntu-20.04 @@ -60,15 +61,17 @@ jobs: # - "ts:lint" - "php:cs-fixer" php-version: - - 7.4 + - 8.1 + - 8.2 + - 8.2 tests: runs-on: ubuntu-latest strategy: max-parallel: 2 matrix: - php-versions: [7.4, 8.0] + php-versions: [8.1, 8.2, 8.3] typo3-versions: - - {typo3: 11, testing: 6} + - {typo3: 12, testing: 7} name: "Run tests with PHP ${{ matrix.php-versions }} using TYPO3 ${{ matrix.typo3-versions.typo3 }} From 1f7bbdd396f24685bea440d5e95b5f90a09d822e Mon Sep 17 00:00:00 2001 From: Sven Petersen Date: Wed, 14 Feb 2024 20:28:46 +0100 Subject: [PATCH 3/3] [WIP] TYPO3 v12 compatibility --- .github/workflows/codecoverage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codecoverage.yml b/.github/workflows/codecoverage.yml index dcb7420..f6a931b 100644 --- a/.github/workflows/codecoverage.yml +++ b/.github/workflows/codecoverage.yml @@ -55,6 +55,6 @@ jobs: fail-fast: false matrix: php-version: - - 8.0 + - 8.1 typo3-version: - - ^11.5 + - ^12.4