diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 41ec74b..2906325 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -15,11 +15,11 @@ jobs: fail-fast: false matrix: php-version: ["8.1", "8.2", "8.3", "8.4"] - typo3-version: ["11.5", "12.4", "13.0"] + typo3-version: ["11.5", "12.4", "13.4"] dependencies: ["highest", "lowest"] exclude: - php-version: "8.1" - typo3-version: "13.0" + typo3-version: "13.4" - php-version: "8.4" typo3-version: "11.5" env: diff --git a/Classes/ViewHelpers/DateIntervalViewHelper.php b/Classes/ViewHelpers/DateIntervalViewHelper.php index 8060308..d71ee2d 100644 --- a/Classes/ViewHelpers/DateIntervalViewHelper.php +++ b/Classes/ViewHelpers/DateIntervalViewHelper.php @@ -34,19 +34,14 @@ */ final class DateIntervalViewHelper extends Fluid\Core\ViewHelper\AbstractViewHelper { - use Fluid\Core\ViewHelper\Traits\CompileWithContentArgumentAndRenderStatic; - public function initializeArguments(): void { - $this->registerArgument('date', \DateTimeInterface::class, 'The date for which to create an interval'); + $this->registerArgument('date', \DateTimeInterface::class, 'The date for which to create an interval', true); } - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - Fluid\Core\Rendering\RenderingContextInterface $renderingContext, - ): ?int { - $date = $renderChildrenClosure(); + public function render(): ?int + { + $date = $this->renderChildren(); /** @var int $now */ $now = Core\Utility\GeneralUtility::makeInstance(Core\Context\Context::class)->getPropertyFromAspect('date', 'timestamp'); @@ -56,4 +51,9 @@ public static function renderStatic( return $now - $date->getTimestamp(); } + + public function getContentArgumentName(): string + { + return 'date'; + } } diff --git a/Classes/ViewHelpers/Format/HumanDateViewHelper.php b/Classes/ViewHelpers/Format/HumanDateViewHelper.php index 567d0a5..e51738a 100644 --- a/Classes/ViewHelpers/Format/HumanDateViewHelper.php +++ b/Classes/ViewHelpers/Format/HumanDateViewHelper.php @@ -34,20 +34,16 @@ */ final class HumanDateViewHelper extends Fluid\Core\ViewHelper\AbstractViewHelper { - use Fluid\Core\ViewHelper\Traits\CompileWithContentArgumentAndRenderStatic; use Traits\TranslatableTrait; public function initializeArguments(): void { - $this->registerArgument('date', \DateTimeInterface::class, 'The date to format'); + $this->registerArgument('date', \DateTimeInterface::class, 'The date to format', true); } - public static function renderStatic( - array $arguments, - \Closure $renderChildrenClosure, - Fluid\Core\Rendering\RenderingContextInterface $renderingContext, - ): ?string { - $date = $renderChildrenClosure(); + public function render(): ?string + { + $date = $this->renderChildren(); if (!($date instanceof \DateTimeInterface)) { return null; @@ -60,6 +56,11 @@ public static function renderStatic( return self::renderHumanDateInterval($date, $delta, $interval); } + public function getContentArgumentName(): string + { + return 'date'; + } + private static function renderHumanDateInterval(\DateTimeInterface $date, int $delta, \DateInterval $interval): string { if ($delta <= 30) { diff --git a/README.md b/README.md index 8d23266..befbf22 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ console commands to list and flush the mail queue. * Improved queueable file transport with failure metadata * Backend module to list mails in queue * Console command to list queue and flush mails -* Compatible with TYPO3 11.5 LTS, 12.4 LTS and 13.0 +* Compatible with TYPO3 11.5 LTS, 12.4 LTS and 13.4 LTS ## 🔥 Installation diff --git a/composer.json b/composer.json index 7a1923f..01e25ad 100644 --- a/composer.json +++ b/composer.json @@ -18,10 +18,10 @@ "symfony/console": "^5.4 || ^6.4 || ^7.0", "symfony/mailer": "^5.4 || ^6.4 || ^7.0", "symfony/mime": "^5.4 || ^6.4 || ^7.0", - "typo3/cms-backend": "~11.5.0 || ~12.4.0 || ~13.0.0", - "typo3/cms-core": "~11.5.0 || ~12.4.0 || ~13.0.0", - "typo3/cms-fluid": "~11.5.0 || ~12.4.0 || ~13.0.0", - "typo3fluid/fluid": "^2.7" + "typo3/cms-backend": "~11.5.0 || ~12.4.0 || ~13.4.0", + "typo3/cms-core": "~11.5.0 || ~12.4.0 || ~13.4.0", + "typo3/cms-fluid": "~11.5.0 || ~12.4.0 || ~13.4.0", + "typo3fluid/fluid": "^2.15 || ^4.0" }, "require-dev": { "armin/editorconfig-cli": "^1.8 || ^2.0", @@ -34,9 +34,9 @@ "phpunit/phpcov": "^9.0 || ^10.0", "saschaegerer/phpstan-typo3": "^1.10", "ssch/typo3-rector": "^2.0", - "typo3/cms-lowlevel": "~11.5.0 || ~12.4.0 || ~13.0.0", + "typo3/cms-lowlevel": "~11.5.0 || ~12.4.0 || ~13.4.0", "typo3/coding-standards": "^0.7.0 || ^0.8.0", - "typo3/testing-framework": "^7.0.2 || ^8.0.9" + "typo3/testing-framework": "^7.0.2 || ^8.0.9 || ^9.0.1" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index d13efb5..1a45014 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2c34bc25bd8a70cdf2d52819eeda0827", + "content-hash": "b0ac315a2b185e33897760819a64405d", "packages": [ { "name": "bacon/bacon-qr-code", diff --git a/ext_emconf.php b/ext_emconf.php index 4c3a1b9..6596af9 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -32,7 +32,7 @@ 'author_company' => 'coding. powerful. systems. CPS GmbH', 'constraints' => [ 'depends' => [ - 'typo3' => '11.5.0-13.0.99', + 'typo3' => '11.5.0-13.4.99', 'php' => '8.1.0-8.4.99', ], ],