From 84cc0c79905ea58cf70b9ad226988b3a500e1445 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 26 Aug 2021 11:56:35 +0200 Subject: [PATCH 01/12] [TASK] Drop CI task dependencies This helps us see all failures on GitHub. --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08eaad07..df5456be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -104,7 +104,6 @@ jobs: unit-tests: name: "Unit tests" runs-on: ubuntu-22.04 - needs: php-lint steps: - name: "Checkout" uses: actions/checkout@v4 @@ -197,7 +196,6 @@ jobs: functional-tests: name: "Functional tests" runs-on: ubuntu-22.04 - needs: php-lint env: DB_DATABASE: typo3 DB_USER: root From 9b326f5bc2025476f77a438674debdb98858eb4f Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 26 Aug 2021 11:59:24 +0200 Subject: [PATCH 02/12] Break composer normalize --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4bcb12b4..ad2611c6 100644 --- a/composer.json +++ b/composer.json @@ -72,7 +72,6 @@ "conflict": { "typo3/class-alias-loader": "< 1.1.0" }, - "prefer-stable": true, "autoload": { "psr-4": { "TTN\\Tea\\": "Classes/" @@ -83,6 +82,7 @@ "TTN\\Tea\\Tests\\": "Tests/" } }, + "prefer-stable": true, "config": { "allow-plugins": { "ergebnis/composer-normalize": true, From 9ab967411d71b4c49e3a9dafd8da979c96a9edb6 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 26 Aug 2021 12:00:34 +0200 Subject: [PATCH 03/12] Break json:lint --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 58f83df9..2c136a06 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,6 @@ "prettier": "^3.1.0", "stylelint": "^15.11.0", "stylelint-config-recommended": "^13.0.0", - "stylelint-no-browser-hacks": "^1.2.1" + "stylelint-no-browser-hacks": "^1.2.1", } } From af057d5fa20d8ced5a8e5f922cb4bcd5aaff7d81 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 26 Aug 2021 12:06:13 +0200 Subject: [PATCH 04/12] Break ci:yaml:lint --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f3bc292a..5a9b8bf5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,6 +15,6 @@ jobs: - name: "Checkout" uses: actions/checkout@v4 - name: "Publish new version to TER" - uses: tomasnorre/typo3-upload-ter@v2 + - uses: tomasnorre/typo3-upload-ter@v2 with: api-token: ${{ secrets.TYPO3_API_TOKEN }} From 9e7b3648167f5842c9b8389400d0a715738277fe Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 26 Aug 2021 12:06:58 +0200 Subject: [PATCH 05/12] Break ci:ts:lint --- Configuration/TypoScript/setup.typoscript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index 4de562ad..eaa91851 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -14,10 +14,10 @@ plugin.tx_tea { } persistence { - storagePid = {$plugin.tx_tea.persistence.storagePid} + storagePid = {$plugin.tx_tea.persistence.storagePid} } settings { - singleViewPageUid = {$plugin.tx_tea.settings.singleViewPageUid} + singleViewPageUid = {$plugin.tx_tea.settings.singleViewPageUid} } } From d1fcbb19af11f0fb683119802f9e4a0c915ab1a3 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 26 Aug 2021 12:13:47 +0200 Subject: [PATCH 06/12] Add `Tea.internalNotes` and break XLIFF, PHP < 7.4, and the sniffer --- Classes/Domain/Model/Product/Tea.php | 12 +++++++++++- .../TCA/tx_tea_domain_model_product_tea.php | 12 +++++++++++- Resources/Private/Language/de.locallang_db.xlf | 4 ++++ Resources/Private/Language/locallang_db.xlf | 3 +++ ext_tables.sql | 1 + 5 files changed, 30 insertions(+), 2 deletions(-) diff --git a/Classes/Domain/Model/Product/Tea.php b/Classes/Domain/Model/Product/Tea.php index 9060a55a..4c13b77d 100644 --- a/Classes/Domain/Model/Product/Tea.php +++ b/Classes/Domain/Model/Product/Tea.php @@ -25,7 +25,9 @@ class Tea extends AbstractEntity */ protected string $description = ''; - /** + private string $internalNotes; + + /** * @var FileReference|null * @phpstan-var FileReference|LazyLoadingProxy|null * @Extbase\ORM\Lazy @@ -59,6 +61,14 @@ public function setDescription(string $description): void $this->description = $description; } + public function getInternalNotes(): string { + return $this->internalNotes; + } + + public function setInternalNotes(string $notes): void { + $this->internalNotes = $notes; + } + public function getImage(): ?FileReference { if ($this->image instanceof LazyLoadingProxy) { diff --git a/Configuration/TCA/tx_tea_domain_model_product_tea.php b/Configuration/TCA/tx_tea_domain_model_product_tea.php index 781270e5..f707442a 100644 --- a/Configuration/TCA/tx_tea_domain_model_product_tea.php +++ b/Configuration/TCA/tx_tea_domain_model_product_tea.php @@ -25,7 +25,7 @@ '1' => [ 'showitem' => '--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general, - title, description, image, owner, + title, description, internalNotes, image, owner, --div--;LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.tabs.access, --palette--;;hidden, --palette--;;access,', @@ -146,6 +146,16 @@ 'eval' => 'trim', ], ], + 'internalNotes' => [ + 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.internalNotes', + 'config' => [ + 'type' => 'text', + 'rows' => 8, + 'cols' => 40, + 'max' => 2000, + 'eval' => 'trim', + ], + ], 'image' => [ 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.image', 'config' => [ diff --git a/Resources/Private/Language/de.locallang_db.xlf b/Resources/Private/Language/de.locallang_db.xlf index 939220c9..b1ed6bbb 100644 --- a/Resources/Private/Language/de.locallang_db.xlf +++ b/Resources/Private/Language/de.locallang_db.xlf @@ -19,6 +19,10 @@ Description Beschreibung + + Internal notes + Interne Notizen + Image Bild diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index de64197f..077c04a1 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -15,6 +15,9 @@ Description + + Internal notes + Image diff --git a/ext_tables.sql b/ext_tables.sql index d013de39..388f5398 100644 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -1,6 +1,7 @@ CREATE TABLE tx_tea_domain_model_product_tea ( title varchar(255) DEFAULT '' NOT NULL, description varchar(2000) DEFAULT '' NOT NULL, + internalNotes varchar(2000) DEFAULT '' NOT NULL, image int(11) unsigned DEFAULT '0' NOT NULL, owner int(11) unsigned DEFAULT '0' NOT NULL, From 03892a2639b8145ca48963c0e1ceeb175ab81ff8 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 26 Aug 2021 12:22:25 +0200 Subject: [PATCH 07/12] Break PHPStan --- Classes/Domain/Model/Product/Tea.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Domain/Model/Product/Tea.php b/Classes/Domain/Model/Product/Tea.php index 4c13b77d..7c48a2dc 100644 --- a/Classes/Domain/Model/Product/Tea.php +++ b/Classes/Domain/Model/Product/Tea.php @@ -66,7 +66,7 @@ public function getInternalNotes(): string { } public function setInternalNotes(string $notes): void { - $this->internalNotes = $notes; + $this->internalNote = $notes; } public function getImage(): ?FileReference From 102ced2153dd6d636badec272e20a6e4135b87dd Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 26 Aug 2021 13:46:52 +0200 Subject: [PATCH 08/12] Display the internal notes in the FE --- Resources/Private/Templates/Tea/Show.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Resources/Private/Templates/Tea/Show.html b/Resources/Private/Templates/Tea/Show.html index 9bea907d..61d6feb5 100644 --- a/Resources/Private/Templates/Tea/Show.html +++ b/Resources/Private/Templates/Tea/Show.html @@ -8,5 +8,11 @@

{tea.description -> f:format.html()} + + +

+ {tea.internalNotes} +

+
From 92eefeeff2f5ff1c869835c31f4c0f20732b1d9f Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Mon, 14 Aug 2023 14:37:28 +0200 Subject: [PATCH 09/12] Break the unit tests --- Classes/Domain/Model/Product/Tea.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Domain/Model/Product/Tea.php b/Classes/Domain/Model/Product/Tea.php index 7c48a2dc..bc5f533b 100644 --- a/Classes/Domain/Model/Product/Tea.php +++ b/Classes/Domain/Model/Product/Tea.php @@ -23,7 +23,7 @@ class Tea extends AbstractEntity /** * @Extbase\Validate("StringLength", options={"maximum": 2000}) */ - protected string $description = ''; + protected string $description; private string $internalNotes; From 3eb190d58450e63978620b6949ccae58520c7284 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Mon, 14 Aug 2023 14:38:36 +0200 Subject: [PATCH 10/12] Break the PSR4 verification --- Tests/Unit/Controller/TeaControllerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Unit/Controller/TeaControllerTest.php b/Tests/Unit/Controller/TeaControllerTest.php index a71c421a..09cebe0f 100644 --- a/Tests/Unit/Controller/TeaControllerTest.php +++ b/Tests/Unit/Controller/TeaControllerTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace TTN\Tea\Tests\Unit\Controller; +namespace TTN\Tea\Tests\Controller; use PHPUnit\Framework\MockObject\MockObject; use TTN\Tea\Controller\TeaController; From 65a4738b6f05f97479f1aa36a4ba9f6b727a7af6 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Wed, 1 Nov 2023 16:11:13 +0100 Subject: [PATCH 11/12] Break the PHP linting --- Classes/Domain/Model/Product/Tea.php | 18 ++++++++++-------- Configuration/Extbase/Persistence/Classes.php | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Classes/Domain/Model/Product/Tea.php b/Classes/Domain/Model/Product/Tea.php index bc5f533b..15fde312 100644 --- a/Classes/Domain/Model/Product/Tea.php +++ b/Classes/Domain/Model/Product/Tea.php @@ -25,13 +25,13 @@ class Tea extends AbstractEntity */ protected string $description; - private string $internalNotes; + private string $internalNotes; - /** - * @var FileReference|null - * @phpstan-var FileReference|LazyLoadingProxy|null - * @Extbase\ORM\Lazy - */ + /** + * @var FileReference|null + * @phpstan-var FileReference|LazyLoadingProxy|null + * @Extbase\ORM\Lazy + */ protected $image; // Note: We cannot use `@var` for the more specific type annotation here as this confuses the Extbase type mapper. @@ -61,11 +61,13 @@ public function setDescription(string $description): void $this->description = $description; } - public function getInternalNotes(): string { + public function getInternalNotes(): string + { return $this->internalNotes; } - public function setInternalNotes(string $notes): void { + public function setInternalNotes(string $notes): void + { $this->internalNote = $notes; } diff --git a/Configuration/Extbase/Persistence/Classes.php b/Configuration/Extbase/Persistence/Classes.php index 6b92623d..8a7b4477 100644 --- a/Configuration/Extbase/Persistence/Classes.php +++ b/Configuration/Extbase/Persistence/Classes.php @@ -7,5 +7,5 @@ 'properties' => [ 'ownerUid' => ['fieldName' => 'owner'], ], - ], + ],, ]; From b25aaed1f332a6eee59ac50a5278ea7976503727 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Wed, 1 Nov 2023 16:14:34 +0100 Subject: [PATCH 12/12] Break PHPStan in more places --- Classes/Domain/Model/Product/Tea.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Domain/Model/Product/Tea.php b/Classes/Domain/Model/Product/Tea.php index 15fde312..15b43414 100644 --- a/Classes/Domain/Model/Product/Tea.php +++ b/Classes/Domain/Model/Product/Tea.php @@ -29,7 +29,7 @@ class Tea extends AbstractEntity /** * @var FileReference|null - * @phpstan-var FileReference|LazyLoadingProxy|null + * @phpstan-var LazyLoadingProxy|null * @Extbase\ORM\Lazy */ protected $image;