From 4498e328237ea47d9982697f1102c2206fdac6e3 Mon Sep 17 00:00:00 2001 From: Matthias Vogel Date: Thu, 19 Nov 2026 18:51:04 +0000 Subject: [PATCH 1/3] [TASK] Allow and test PHP 8.6 --- .github/workflows/tasks.yml | 10 +++++++--- composer.json | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tasks.yml b/.github/workflows/tasks.yml index 98cf687..2a17fc3 100644 --- a/.github/workflows/tasks.yml +++ b/.github/workflows/tasks.yml @@ -9,8 +9,12 @@ jobs: strategy: fail-fast: false matrix: - php: [ '8.3', '8.4', '8.5' ] + php: [ '8.3', '8.4', '8.5', '8.6' ] typo3: [ '13' ] + include: + # phpro/grumphp does not allow PHP 8.6 yet + - php: '8.6' + ignorePlatformReqs: '--ignore-platform-req=php+' steps: - name: Setup PHP with PECL extension uses: shivammathur/setup-php@v2 @@ -23,8 +27,8 @@ jobs: key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} restore-keys: | ${{ runner.os }}-${{ matrix.php }}-composer- - - run: composer require typo3/cms-frontend="^${{ matrix.typo3 }}" --dev - - run: composer install --no-interaction --no-progress + - run: composer require typo3/cms-frontend="^${{ matrix.typo3 }}" --dev ${{ matrix.ignorePlatformReqs }} + - run: composer install --no-interaction --no-progress ${{ matrix.ignorePlatformReqs }} - run: ./vendor/bin/grumphp run --ansi - run: composer test diff --git a/composer.json b/composer.json index 04902e1..268b90c 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "docs": "https://github.com/andersundsehr/mail_logger/blob/master/README.md" }, "require": { - "php": "~8.3.0 || ~8.4.0 || ~8.5.0", + "php": "~8.3.0 || ~8.4.0 || ~8.5.0 || ~8.6.0", "composer-runtime-api": "^2", "typo3/cms-core": "^13.4.0", "typo3/cms-extbase": "^13.4.0" From 35638b214d84e81d3a71eb2ed8c2504dd95c4cb4 Mon Sep 17 00:00:00 2001 From: Matthias Vogel Date: Thu, 19 Nov 2026 19:10:29 +0000 Subject: [PATCH 2/3] [BUGFIX] Detect an invalid anonymization period on all PHP versions --- Classes/Domain/Repository/MailLogRepository.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Classes/Domain/Repository/MailLogRepository.php b/Classes/Domain/Repository/MailLogRepository.php index a8daf54..282e536 100644 --- a/Classes/Domain/Repository/MailLogRepository.php +++ b/Classes/Domain/Repository/MailLogRepository.php @@ -6,6 +6,7 @@ use Override; use DateTime; +use Exception; use InvalidArgumentException; use Pluswerk\MailLogger\Domain\Model\MailLog; use Pluswerk\MailLogger\Dto\MailLogFilter; @@ -99,9 +100,10 @@ private function anonymizeMailLogIfNeeded(MailLog $mailLog): void } $anonymizeAfter = $this->cleanupSettingsService->getAnonymizeAfter(); - $anonymizeDate = new DateTime(); - if ($anonymizeDate->modify('-' . $anonymizeAfter) === false) { - throw new InvalidArgumentException('Invalid anonymization period', 8348363882); + try { + $anonymizeDate = new DateTime('-' . $anonymizeAfter); + } catch (Exception $exception) { + throw new InvalidArgumentException('Invalid anonymization period', 8348363882, $exception); } if ($mailLog->getCrdate() > $anonymizeDate->getTimestamp()) { From cef97554e7340dc2a429931727f28ebcbc78f619 Mon Sep 17 00:00:00 2001 From: Matthias Vogel Date: Thu, 19 Nov 2026 19:14:29 +0000 Subject: [PATCH 3/3] [TASK] Check that only dev dependencies skip the PHP 8.6 check --- .github/workflows/tasks.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tasks.yml b/.github/workflows/tasks.yml index 2a17fc3..31512fb 100644 --- a/.github/workflows/tasks.yml +++ b/.github/workflows/tasks.yml @@ -29,6 +29,9 @@ jobs: ${{ runner.os }}-${{ matrix.php }}-composer- - run: composer require typo3/cms-frontend="^${{ matrix.typo3 }}" --dev ${{ matrix.ignorePlatformReqs }} - run: composer install --no-interaction --no-progress ${{ matrix.ignorePlatformReqs }} + # --ignore-platform-req=php+ may only skip the PHP check of dev dependencies (e.g. phpro/grumphp) + - if: matrix.php == '8.6' + run: composer check-platform-reqs --no-dev - run: ./vendor/bin/grumphp run --ansi - run: composer test