diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 04665e5..2beef6f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,6 +23,7 @@ jobs: - 8.1 - 8.2 - 8.3 + - 8.4 steps: - name: Checkout uses: actions/checkout@v3 @@ -45,7 +46,7 @@ jobs: - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: "8.2" + php-version: "8.4" coverage: none tools: composer:v2 @@ -76,6 +77,7 @@ jobs: with: coverage: none tools: composer:v2 + # Lower version due to php-cs-fixer php-version: "8.3" - name: Install dependencies @@ -97,6 +99,14 @@ jobs: typo3-version: '^12.4' - php-version: '8.3' typo3-version: '^12.4' + - php-version: '8.4' + typo3-version: '^12.4' + - php-version: '8.2' + typo3-version: '^13.4' + - php-version: '8.3' + typo3-version: '^13.4' + - php-version: '8.4' + typo3-version: '^13.4' steps: - uses: actions/checkout@v3 @@ -126,6 +136,14 @@ jobs: typo3-version: '^12.4' - php-version: '8.3' typo3-version: '^12.4' + - php-version: '8.4' + typo3-version: '^12.4' + - php-version: '8.2' + typo3-version: '^13.4' + - php-version: '8.3' + typo3-version: '^13.4' + - php-version: '8.4' + typo3-version: '^13.4' steps: - uses: actions/checkout@v3 diff --git a/Documentation/Changelog/2.1.0.rst b/Documentation/Changelog/2.1.0.rst new file mode 100644 index 0000000..05d8838 --- /dev/null +++ b/Documentation/Changelog/2.1.0.rst @@ -0,0 +1,28 @@ +2.1.0 +===== + +Breaking +-------- + +Nothing + +Features +-------- + +* Add compatibility for TYPO3 v13.4 and PHP 8.4. + +Fixes +----- + +Nothing + +Tasks +----- + +Nothing + +Deprecation +----------- + +Nothing + diff --git a/Tests/Fixtures/BasicDatabase.php b/Tests/Fixtures/BasicDatabase.php index fee9931..e02f87b 100644 --- a/Tests/Fixtures/BasicDatabase.php +++ b/Tests/Fixtures/BasicDatabase.php @@ -21,8 +21,8 @@ return [ 'clear' => 3, 'constants' => 'databasePlatform = mysql', 'config' => ' - <INCLUDE_TYPOSCRIPT: source="FILE:EXT:calendar_example/Configuration/TypoScript/Setup.typoscript"> - <INCLUDE_TYPOSCRIPT: source="FILE:EXT:fluid_styled_content/Configuration/TypoScript/setup.typoscript"> + @import "EXT:calendar_example/Configuration/TypoScript/setup.typoscript" + @import "EXT:fluid_styled_content/Configuration/TypoScript/setup.typoscript" ', ], ], diff --git a/Tests/Fixtures/calendar_example/Configuration/TypoScript/Setup.typoscript b/Tests/Fixtures/calendar_example/Configuration/TypoScript/setup.typoscript similarity index 100% rename from Tests/Fixtures/calendar_example/Configuration/TypoScript/Setup.typoscript rename to Tests/Fixtures/calendar_example/Configuration/TypoScript/setup.typoscript diff --git a/Tests/Functional/CalendarControllerTest.php b/Tests/Functional/CalendarControllerTest.php index fdfb58f..937beba 100644 --- a/Tests/Functional/CalendarControllerTest.php +++ b/Tests/Functional/CalendarControllerTest.php @@ -275,7 +275,7 @@ class CalendarControllerTest extends FunctionalTestCase self::assertSame(200, $result->getStatusCode()); $html = $result->getBody()->__toString(); - self::assertStringContainsString((new DateFormatter())->strftime('%B %Y', 'now', 'de-DE'), $html); + self::assertStringContainsString((new DateFormatter())->strftime('%B %Y', 'now', 'en-GB'), $html); self::assertStringContainsString('exampleValue', $html); } diff --git a/Tests/Unit/Domain/Model/ContextTest.php b/Tests/Unit/Domain/Model/ContextTest.php index c7cbfd4..405aaf8 100644 --- a/Tests/Unit/Domain/Model/ContextTest.php +++ b/Tests/Unit/Domain/Model/ContextTest.php @@ -33,7 +33,7 @@ class ContextTest extends TestCase #[Test] public function canBeCreatedFromContentObjectRenderer(): void { - $contentObjectRenderer = $this->createStub(ContentObjectRenderer::class); + $contentObjectRenderer = self::createStub(ContentObjectRenderer::class); $subject = Context::createFromContentObjectRenderer($contentObjectRenderer); self::assertInstanceOf(Context::class, $subject); @@ -42,7 +42,7 @@ class ContextTest extends TestCase #[Test] public function providesTableNameInheritedFromContentObjectRenderer(): void { - $contentObjectRenderer = $this->createStub(ContentObjectRenderer::class); + $contentObjectRenderer = self::createStub(ContentObjectRenderer::class); $contentObjectRenderer->method('getCurrentTable')->willReturn('tx_calendar_example_table'); $subject = Context::createFromContentObjectRenderer($contentObjectRenderer); @@ -52,7 +52,7 @@ class ContextTest extends TestCase #[Test] public function providesDatabaseRowInheritedFromContentObjectRenderer(): void { - $contentObjectRenderer = $this->createStub(ContentObjectRenderer::class); + $contentObjectRenderer = self::createStub(ContentObjectRenderer::class); $contentObjectRenderer->data = [ 'uid' => 10, 'pid' => 1, diff --git a/Tests/Unit/Domain/Model/DayTest.php b/Tests/Unit/Domain/Model/DayTest.php index 5177f05..0ad56d7 100644 --- a/Tests/Unit/Domain/Model/DayTest.php +++ b/Tests/Unit/Domain/Model/DayTest.php @@ -107,7 +107,7 @@ class DayTest extends TestCase { $subject = new Day(new \DateTime('2020-10-19')); - $foreignData = $this->createStub(IsDayActive::class); + $foreignData = self::createStub(IsDayActive::class); $foreignData->method('isActive')->willReturn(false); $this->forceProperty($subject, 'initialized', true); @@ -121,10 +121,10 @@ class DayTest extends TestCase { $subject = new Day(new \DateTime('2020-10-19')); - $foreignData = $this->createStub(IsDayActive::class); + $foreignData = self::createStub(IsDayActive::class); $foreignData->method('isActive')->willReturn(true); - $factory = $this->createStub(ForeignDataFactory::class); + $factory = self::createStub(ForeignDataFactory::class); $factory->method('getData')->willReturn($foreignData); GeneralUtility::addInstance(ForeignDataFactory::class, $factory); diff --git a/Tests/Unit/Domain/Model/MonthTest.php b/Tests/Unit/Domain/Model/MonthTest.php index 5e8c81b..15a46dc 100644 --- a/Tests/Unit/Domain/Model/MonthTest.php +++ b/Tests/Unit/Domain/Model/MonthTest.php @@ -183,7 +183,7 @@ class MonthTest extends TestCase { $subject = new Month(02, 2018); - $week = $this->createStub(Week::class); + $week = self::createStub(Week::class); $week->method('isActive')->willReturn(false); $weeks = [$week]; $this->forceProperty($subject, 'weeks', $weeks); @@ -196,9 +196,9 @@ class MonthTest extends TestCase { $subject = new Month(02, 2018); - $week = $this->createStub(Week::class); + $week = self::createStub(Week::class); $week->method('isActive')->willReturn(true); - $week2 = $this->createStub(Week::class); + $week2 = self::createStub(Week::class); $week2->method('isActive')->willReturn(false); $weeks = [$week, $week2]; $this->forceProperty($subject, 'weeks', $weeks); diff --git a/Tests/Unit/Domain/Model/NullDataFactoryTest.php b/Tests/Unit/Domain/Model/NullDataFactoryTest.php index 3e54ebe..69a6402 100644 --- a/Tests/Unit/Domain/Model/NullDataFactoryTest.php +++ b/Tests/Unit/Domain/Model/NullDataFactoryTest.php @@ -32,7 +32,7 @@ class NullDataFactoryTest extends TestCase public function returnsNull(): void { $subject = new NullDataFactory(); - $day = $this->createStub(Day::class); + $day = self::createStub(Day::class); self::assertNull($subject->getData($day)); } } diff --git a/Tests/Unit/Domain/Model/WeekTest.php b/Tests/Unit/Domain/Model/WeekTest.php index 4368e9e..6f57310 100644 --- a/Tests/Unit/Domain/Model/WeekTest.php +++ b/Tests/Unit/Domain/Model/WeekTest.php @@ -175,7 +175,7 @@ class WeekTest extends TestCase { $subject = new Week(02, 2018); - $day = $this->createStub(Day::class); + $day = self::createStub(Day::class); $day->method('isActive')->willReturn(false); $days = [$day]; $this->forceProperty($subject, 'days', $days); @@ -188,9 +188,9 @@ class WeekTest extends TestCase { $subject = new Week(02, 2018); - $day = $this->createStub(Day::class); + $day = self::createStub(Day::class); $day->method('isActive')->willReturn(true); - $day2 = $this->createStub(Day::class); + $day2 = self::createStub(Day::class); $day2->method('isActive')->willReturn(false); $days = [$day, $day2]; $this->forceProperty($subject, 'days', $days); diff --git a/Tests/Unit/Domain/Model/YearTest.php b/Tests/Unit/Domain/Model/YearTest.php index 4af88e6..5106796 100644 --- a/Tests/Unit/Domain/Model/YearTest.php +++ b/Tests/Unit/Domain/Model/YearTest.php @@ -114,7 +114,7 @@ class YearTest extends TestCase { $subject = new Year(2020); - $month = $this->createStub(Month::class); + $month = self::createStub(Month::class); $month->method('isActive')->willReturn(false); $months = [$month]; $this->forceProperty($subject, 'months', $months); @@ -127,7 +127,7 @@ class YearTest extends TestCase { $subject = new Year(2020); - $month = $this->createStub(Month::class); + $month = self::createStub(Month::class); $month->method('isActive')->willReturn(true); $months = [$month]; $this->forceProperty($subject, 'months', $months); diff --git a/composer.json b/composer.json index 294cc84..794ba46 100644 --- a/composer.json +++ b/composer.json @@ -20,12 +20,12 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", - "typo3/cms-backend": "^12.4", - "typo3/cms-core": "^12.4", - "typo3/cms-extbase": "^12.4", - "typo3/cms-fluid-styled-content": "^12.4", - "typo3/cms-frontend": "^12.4" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", + "typo3/cms-backend": "^12.4 || ^13.4", + "typo3/cms-core": "^12.4 || ^13.4", + "typo3/cms-extbase": "^12.4 || ^13.4", + "typo3/cms-fluid-styled-content": "^12.4 || ^13.4", + "typo3/cms-frontend": "^12.4 || ^13.4" }, "autoload": { "psr-4": { diff --git a/ext_emconf.php b/ext_emconf.php index 19cc470..5b048e9 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -10,7 +10,7 @@ $EM_CONF['calendar'] = [ 'state' => 'alpha', 'uploadfolder' => 0, 'clearCacheOnLoad' => 0, - 'version' => '2.0.0', + 'version' => '2.1.0', 'constraints' => [ 'depends' => [ 'typo3' => '*', diff --git a/shell.nix b/shell.nix index 2e5e12d..74a1bd7 100644 --- a/shell.nix +++ b/shell.nix @@ -1,7 +1,7 @@ { pkgs ? import <nixpkgs> { } }: let - php = pkgs.php82.buildEnv { + php = pkgs.php84.buildEnv { extensions = { enabled, all }: enabled ++ (with all; [ xdebug ]); @@ -20,7 +20,7 @@ let ]; text = '' rm -rf vendor/ .Build/ - composer install --prefer-dist --no-progress --working-dir="$PROJECT_ROOT" + composer install --prefer-dist --no-progress ''; }; @@ -35,7 +35,7 @@ let ''; }; -in pkgs.mkShell { +in pkgs.mkShellNoCC { name = "TYPO3 Extension Watchlist"; buildInputs = [ projectInstall @@ -44,9 +44,5 @@ in pkgs.mkShell { composer ]; - shellHook = '' - export PROJECT_ROOT="$(pwd)" - - export typo3DatabaseDriver=pdo_sqlite - ''; + typo3DatabaseDriver = "pdo_sqlite"; }