Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,8 +27,11 @@ 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 }}
# --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

Expand Down
8 changes: 5 additions & 3 deletions Classes/Domain/Repository/MailLogRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Override;
use DateTime;
use Exception;
use InvalidArgumentException;
use Pluswerk\MailLogger\Domain\Model\MailLog;
use Pluswerk\MailLogger\Dto\MailLogFilter;
Expand Down Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading