Support TYPO3 v12

This commit is contained in:
Daniel Siepmann 2023-04-19 09:56:26 +02:00
parent 03320171ce
commit aca340bcd8
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
8 changed files with 94 additions and 26 deletions

View file

@ -20,7 +20,6 @@ jobs:
strategy:
matrix:
php-version:
- 7.3
- 7.4
- 8.0
- 8.1
@ -93,16 +92,16 @@ jobs:
strategy:
matrix:
include:
- php-version: '7.3'
typo3-version: '^10.4'
- php-version: '7.4'
typo3-version: '^10.4'
- php-version: '7.4'
typo3-version: '^11.5'
- php-version: '8.1'
typo3-version: '^11.5'
- php-version: '8.2'
typo3-version: '^11.5'
- php-version: '8.1'
typo3-version: '^12.3'
- php-version: '8.2'
typo3-version: '^12.4'
steps:
- uses: actions/checkout@v3

View file

@ -44,7 +44,6 @@ class Day
public function __construct(
\DateTime $day
) {
$this->periods = new ObjectStorage();
$this->day = \DateTimeImmutable::createFromMutable($day)->modify('midnight');
}

View file

@ -0,0 +1,28 @@
2.0.0
=====
Breaking
--------
* Drop support for TYPO3 v10.4 LTS and PHP 7.3.
Features
--------
* Add compatibility for TYPO3 v12.3.0, 8.1, 8.2.
Fixes
-----
Nothing
Tasks
-----
Nothing
Deprecation
-----------
Nothing

View file

@ -46,6 +46,17 @@ class CalendarControllerTest extends FunctionalTestCase
'typo3conf/ext/calendar/Tests/Fixtures/Sites' => 'typo3conf/sites',
];
protected $configurationToUseInTestInstance = [
'FE' => [
'cacheHash' => [
'excludedParameters' => [
'^tx_calendar_example[',
'typoScriptDefaults',
],
],
],
];
protected function setUp(): void
{
parent::setUp();

View file

@ -32,20 +32,6 @@ use WerkraumMedia\Calendar\Domain\Model\Context;
*/
class ContextTest extends TestCase
{
/**
* @test
*/
public function canNotBeCreatedViaNew(): void
{
$this->expectError();
if (version_compare(PHP_VERSION, '8.0', '>=')) {
$this->expectErrorMessage('Call to private WerkraumMedia\Calendar\Domain\Model\Context::__construct() from scope WerkraumMedia\Calendar\Tests\Unit\Domain\Model\ContextTest');
} else {
$this->expectErrorMessage('Call to private WerkraumMedia\Calendar\Domain\Model\Context::__construct() from context \'WerkraumMedia\Calendar\Tests\Unit\Domain\Model\ContextTest\'');
}
$subject = new Context();
}
/**
* @test
*/

View file

@ -11,16 +11,17 @@
],
"config": {
"sort-packages": true,
"lock": false,
"allow-plugins": {
"typo3/class-alias-loader": true,
"typo3/cms-composer-installers": true
}
},
"require": {
"php": "^7.3.0 || ^7.4.0 || ^8.0.0 || ^8.1.0 || ^8.2.0",
"typo3/cms-core": "^10.4 || ^11.5",
"typo3/cms-extbase": "^10.4 || ^11.5",
"typo3/cms-frontend": "^10.4 || ^11.5"
"php": "^7.4.0 || ^8.0.0 || ^8.1.0 || ^8.2.0",
"typo3/cms-core": "^11.5 || ^12.3",
"typo3/cms-extbase": "^11.5 || ^12.3",
"typo3/cms-frontend": "^11.5 || ^12.3"
},
"autoload": {
"psr-4": {
@ -36,7 +37,7 @@
"require-dev": {
"phpunit/phpunit": "^9.5",
"symplify/easy-coding-standard": "^9.2",
"typo3/cms-fluid-styled-content": "^10.4 || ^11.5",
"typo3/cms-fluid-styled-content": "^11.5 || ^12.3",
"typo3/testing-framework": "^6.6"
},
"extra": {

View file

@ -10,7 +10,7 @@ $EM_CONF['calendar'] = [
'state' => 'alpha',
'uploadfolder' => 0,
'clearCacheOnLoad' => 0,
'version' => '1.1.0',
'version' => '2.0.0',
'constraints' => [
'depends' => [
'typo3' => '*',

44
shell.nix Normal file
View file

@ -0,0 +1,44 @@
{ pkgs ? import <nixpkgs> { } }:
let
php = pkgs.php82;
inherit (pkgs.php82Packages) composer;
projectInstall = pkgs.writeShellApplication {
name = "project-install";
runtimeInputs = [
php
composer
];
text = ''
rm -rf vendor/ .Build/
composer install --prefer-dist --no-progress --working-dir="$PROJECT_ROOT"
'';
};
projectValidateComposer = pkgs.writeShellApplication {
name = "project-validate-composer";
runtimeInputs = [
php
composer
];
text = ''
composer validate
'';
};
in pkgs.mkShell {
name = "TYPO3 Extension Watchlist";
buildInputs = [
projectInstall
projectValidateComposer
php
composer
];
shellHook = ''
export PROJECT_ROOT="$(pwd)"
export typo3DatabaseDriver=pdo_sqlite
'';
}