Skip to content

Commit 61d8ac9

Browse files
authored
Merge pull request #821 from jandaroscher/master
TYPO3 13 Compatibility
2 parents 766a18d + ab5a8f9 commit 61d8ac9

21 files changed

+91
-42
lines changed

Classes/DataProcessing/DisableLanguageMenuProcessor.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use HDNET\Calendarize\Service\IndexerService;
88
use Psr\Http\Message\ServerRequestInterface;
99
use TYPO3\CMS\Backend\Utility\BackendUtility;
10+
use TYPO3\CMS\Core\Database\Connection;
1011
use TYPO3\CMS\Core\Database\ConnectionPool;
1112
use TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction;
1213
use TYPO3\CMS\Core\Routing\PageArguments;
@@ -107,12 +108,12 @@ protected function getAvailableLanguages(int $indexId): array
107108
// Current language of the record
108109
$queryBuilder->expr()->eq(
109110
'uid',
110-
$queryBuilder->createNamedParameter($indexId, \PDO::PARAM_INT)
111+
$queryBuilder->createNamedParameter($indexId, Connection::PARAM_INT)
111112
),
112113
// Translated versions of the records (found by l10n_parent)
113114
$queryBuilder->expr()->eq(
114115
$transOrigPointerField,
115-
$queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT)
116+
$queryBuilder->createNamedParameter($uid, Connection::PARAM_INT)
116117
)
117118
)
118119
)

Classes/Domain/Repository/RawIndexRepository.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use HDNET\Calendarize\Utility\DateTimeUtility;
66
use TYPO3\CMS\Backend\Utility\BackendUtility;
7+
use TYPO3\CMS\Core\Database\Connection;
78
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
89
use TYPO3\CMS\Core\Database\Query\Restriction\HiddenRestriction;
910
use TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction;
@@ -96,7 +97,7 @@ public function findEventsAfterStartDate(
9697
),
9798
$queryBuilder->expr()->eq(
9899
'foreign_uid',
99-
$queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT)
100+
$queryBuilder->createNamedParameter($uid, Connection::PARAM_INT)
100101
)
101102
)
102103
)

Classes/EventListener/CategoryConstraintEventListener.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use HDNET\Calendarize\Event\IndexRepositoryDefaultConstraintEvent;
1111
use HDNET\Calendarize\Register;
1212
use HDNET\Calendarize\Utility\HelperUtility;
13+
use TYPO3\CMS\Core\Database\Connection;
1314
use TYPO3\CMS\Core\Utility\MathUtility;
1415

1516
class CategoryConstraintEventListener
@@ -175,7 +176,7 @@ protected function getIndexIds(array $categories, string $conjunction, array $ta
175176
)
176177
)->having(
177178
'COUNT(DISTINCT ' . $queryBuilder->quoteIdentifier($uidLocal_field) . ') = '
178-
. $queryBuilder->createNamedParameter(\count($categories), \PDO::PARAM_INT)
179+
. $queryBuilder->createNamedParameter(\count($categories), Connection::PARAM_INT)
179180
);
180181
break;
181182

Classes/EventListener/CategoryFilterEventListener.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use HDNET\Calendarize\Controller\CalendarController;
88
use HDNET\Calendarize\Domain\Repository\CategoryRepository;
99
use HDNET\Calendarize\Event\GenericActionAssignmentEvent;
10+
use TYPO3\CMS\Core\Database\Connection;
1011
use TYPO3\CMS\Core\Database\ConnectionPool;
1112
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
1213

@@ -56,11 +57,11 @@ protected function getCategories(string $tableName, string $fieldName): array
5657
$queryBuilder->expr()->and(
5758
$queryBuilder->expr()->eq(
5859
'sys_category_record_mm.tablenames',
59-
$queryBuilder->createNamedParameter($tableName, \PDO::PARAM_STR)
60+
$queryBuilder->createNamedParameter($tableName, Connection::PARAM_STR)
6061
),
6162
$queryBuilder->expr()->eq(
6263
'sys_category_record_mm.fieldname',
63-
$queryBuilder->createNamedParameter($fieldName, \PDO::PARAM_STR)
64+
$queryBuilder->createNamedParameter($fieldName, Connection::PARAM_STR)
6465
)
6566
)
6667
);

Classes/EventListener/PreviewRenderingEventListener.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use TYPO3\CMS\Backend\View\Event\PageContentPreviewRenderingEvent;
1212
use TYPO3\CMS\Core\Imaging\Icon;
1313
use TYPO3\CMS\Core\Imaging\IconFactory;
14+
use TYPO3\CMS\Core\Imaging\IconSize;
1415

1516
/**
1617
* Provides backend preview for calendarize plugins.
@@ -36,7 +37,7 @@ public function __invoke(PageContentPreviewRenderingEvent $event): void
3637
return;
3738
}
3839

39-
$extensionIconUsage = $this->iconFactory->getIcon('ext-calendarize-wizard-icon', Icon::SIZE_SMALL)->render();
40+
$extensionIconUsage = $this->iconFactory->getIcon('ext-calendarize-wizard-icon', IconSize::SMALL)->render();
4041
$this->layoutService->setTitle($extensionIconUsage . ' Calendarize');
4142

4243
$listType = explode('_', $record['list_type'], 2)[1] ?? '';

Classes/Utility/EventUtility.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Psr\Http\Message\ServerRequestInterface;
88
use TYPO3\CMS\Backend\Utility\BackendUtility;
99
use TYPO3\CMS\Core\Core\Environment;
10+
use TYPO3\CMS\Core\Database\Connection;
1011
use TYPO3\CMS\Core\Database\ConnectionPool;
1112
use TYPO3\CMS\Core\Http\ApplicationType;
1213
use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -70,7 +71,7 @@ public static function getOriginalRecordByConfigurationInWorkspace(
7071
$queryBuilder->select('*')
7172
->from($table)
7273
->where(
73-
$queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
74+
$queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, Connection::PARAM_INT))
7475
);
7576

7677
$row = $queryBuilder->executeQuery()->fetchAssociative();

Classes/ViewHelpers/TitleTagViewHelper.php

+3-8
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,14 @@
1616
*/
1717
class TitleTagViewHelper extends AbstractViewHelper
1818
{
19-
use CompileWithRenderStatic;
20-
2119
/**
2220
* Render the title function.
2321
*
2422
* @return string
2523
*/
26-
public static function renderStatic(
27-
array $arguments,
28-
\Closure $renderChildrenClosure,
29-
RenderingContextInterface $renderingContext
30-
): void {
31-
$content = trim((string)$renderChildrenClosure());
24+
public function render(): void
25+
{
26+
$content = trim((string)$this->renderChildren());
3227
if (!empty($content)) {
3328
GeneralUtility::makeInstance(CalendarizeTitleProvider::class)->setTitle($content);
3429
}

Configuration/TCA/tx_calendarize_domain_model_configuration.php

+26-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,32 @@
7676
'default' => '',
7777
],
7878
],
79-
'fe_group' => $GLOBALS['TCA']['tt_content']['columns']['fe_group'],
79+
'fe_group' => [
80+
'exclude' => true,
81+
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.fe_group',
82+
'config' => [
83+
'type' => 'select',
84+
'renderType' => 'selectMultipleSideBySide',
85+
'size' => 5,
86+
'maxitems' => 20,
87+
'items' => [
88+
0 => [
89+
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hide_at_login',
90+
'value' => -1,
91+
],
92+
1 => [
93+
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.any_login',
94+
'value' => -2,
95+
],
96+
2 => [
97+
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.usergroups',
98+
'value' => '--div--',
99+
],
100+
],
101+
'exclusiveKeys' => '-1,-2',
102+
'foreign_table' => 'fe_groups',
103+
],
104+
],
80105
'editlock' => [
81106
'exclude' => true,
82107
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:editlock',

Configuration/TCA/tx_calendarize_domain_model_configurationgroup.php

+26-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,32 @@
2525
'searchFields' => 'uid,title',
2626
],
2727
'columns' => [
28-
'fe_group' => $GLOBALS['TCA']['tt_content']['columns']['fe_group'],
28+
'fe_group' => [
29+
'exclude' => true,
30+
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.fe_group',
31+
'config' => [
32+
'type' => 'select',
33+
'renderType' => 'selectMultipleSideBySide',
34+
'size' => 5,
35+
'maxitems' => 20,
36+
'items' => [
37+
0 => [
38+
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hide_at_login',
39+
'value' => -1,
40+
],
41+
1 => [
42+
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.any_login',
43+
'value' => -2,
44+
],
45+
2 => [
46+
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.usergroups',
47+
'value' => '--div--',
48+
],
49+
],
50+
'exclusiveKeys' => '-1,-2',
51+
'foreign_table' => 'fe_groups',
52+
],
53+
],
2954
'editlock' => [
3055
'exclude' => true,
3156
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:editlock',

Configuration/page.tsconfig

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
@import 'EXT:calendarize/Configuration/TsConfig/Page/Mod/Wizards/NewContentElement.tsconfig'
3+
@import 'EXT:calendarize/Configuration/TsConfig/Page/TCEMAIN/LinkHandler.tsconfig'
4+

Resources/Private/Php/ICalDissect/src/JMBTechnologyLimited/ICalDissect/ICalEvent.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function __construct(\DateTimeZone $timeZone = null)
5252
$this->timeZone = $timeZone ? $timeZone : $this->timeZoneUTC;
5353
}
5454

55-
public function processLine($keyword, $value, $keywordProperties = '')
55+
public function processLine($keyword, $value, $keywordProperties = ''): void
5656
{
5757
if ($keyword == 'UID') {
5858
$this->uid = $value;
@@ -160,7 +160,7 @@ public function getUid()
160160
return $this->uid;
161161
}
162162

163-
public function setUid($uid)
163+
public function setUid($uid): void
164164
{
165165
$this->uid = $uid;
166166
}

Resources/Private/Php/ICalDissect/src/JMBTechnologyLimited/ICalDissect/ICalTimeZone.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct()
1616
{
1717
}
1818

19-
public function processLine($keyword, $value)
19+
public function processLine($keyword, $value): void
2020
{
2121
if ($keyword == 'TZID') {
2222
$timezoneIdentifiers = \DateTimeZone::listIdentifiers();

Resources/Private/Php/ICalDissect/tests/JMBTechnologyLimited/ICalDissect/ExDateTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
class ExDateTest extends \PHPUnit_Framework_TestCase
1313
{
14-
public function test1()
14+
public function test1(): void
1515
{
1616
$parser = new ICalParser();
1717
$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . '/data/exdate1.ics'));

Resources/Private/Php/ICalDissect/tests/JMBTechnologyLimited/ICalDissect/GeoTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function dataForTestGeo1()
2121
/**
2222
* @dataProvider dataForTestGeo1
2323
*/
24-
public function testGeo1($filename, $lat, $lng)
24+
public function testGeo1($filename, $lat, $lng): void
2525
{
2626
$parser = new ICalParser();
2727
$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . '/data/' . $filename));
@@ -47,7 +47,7 @@ public function dataForTestNoGeo1()
4747
/**
4848
* @dataProvider dataForTestNoGeo1
4949
*/
50-
public function testNoGeo1($filename)
50+
public function testNoGeo1($filename): void
5151
{
5252
$parser = new ICalParser();
5353
$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . '/data/' . $filename));

Resources/Private/Php/ICalDissect/tests/JMBTechnologyLimited/ICalDissect/LineTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function dataForTestMultiLineDescription()
2323
/**
2424
* @dataProvider dataForTestMultiLineDescription
2525
*/
26-
public function testMultiLineDescription($filename, $output)
26+
public function testMultiLineDescription($filename, $output): void
2727
{
2828
$parser = new ICalParser();
2929
$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . '/data/' . $filename));

Resources/Private/Php/ICalDissect/tests/JMBTechnologyLimited/ICalDissect/RRuleTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function dataForTestRRule()
2222
/**
2323
* @dataProvider dataForTestRRule
2424
*/
25-
public function testGetByPosition($filename, $rrule)
25+
public function testGetByPosition($filename, $rrule): void
2626
{
2727
$parser = new ICalParser();
2828
$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . '/data/' . $filename));
@@ -40,7 +40,7 @@ public function testGetByPosition($filename, $rrule)
4040
/**
4141
* @dataProvider dataForTestRRule
4242
*/
43-
public function testGetByArray($filename, $rrule)
43+
public function testGetByArray($filename, $rrule): void
4444
{
4545
$parser = new ICalParser();
4646
$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . '/data/' . $filename));

Resources/Private/Php/ICalDissect/tests/JMBTechnologyLimited/ICalDissect/RawTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
class RawTest extends \PHPUnit_Framework_TestCase
1313
{
14-
public function testGetDefaultValuesIfKeyNotFound()
14+
public function testGetDefaultValuesIfKeyNotFound(): void
1515
{
1616
$parser = new ICalParser();
1717
$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . '/data/rawtest1.ics'));

Resources/Private/Php/ICalDissect/tests/JMBTechnologyLimited/ICalDissect/TimezoneTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ public function dataForTestTimeZone1()
2323
/**
2424
* @dataProvider dataForTestTimeZone1
2525
*/
26-
public function testTimeZone1($filename, $timeZone)
26+
public function testTimeZone1($filename, $timeZone): void
2727
{
2828
$parser = new ICalParser();
2929
$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . '/data/' . $filename));
3030
$this->assertEquals($timeZone, $parser->getTimeZoneIdentifier());
3131
}
3232

33-
public function testTimeZoneFromFileToEvent1()
33+
public function testTimeZoneFromFileToEvent1(): void
3434
{
3535
$parser = new ICalParser();
3636
$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . '/data/TimeZone1.ics'));
@@ -42,7 +42,7 @@ public function testTimeZoneFromFileToEvent1()
4242
$this->assertEquals('2016-10-11T20:00:00+00:00', $event->getEnd()->format('c'));
4343
}
4444

45-
public function testTimeZoneFromMeetupToEvent1()
45+
public function testTimeZoneFromMeetupToEvent1(): void
4646
{
4747
$parser = new ICalParser();
4848
$this->assertTrue($parser->parseFromFile(dirname(__FILE__) . '/data/Meetup1.ics'));

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"php": "^8.1",
3737
"ext-json": "*",
3838
"ext-pdo": "*",
39-
"typo3/cms-core": "^12.4",
39+
"typo3/cms-core": "^13.4",
4040
"sabre/vobject": "^4.2"
4141
},
4242
"replace": {
@@ -53,7 +53,7 @@
5353
},
5454
"require-dev": {
5555
"typo3/testing-framework": "^8.0",
56-
"typo3/cms-workspaces": "^12.4",
56+
"typo3/cms-workspaces": "^13.4",
5757
"friendsofphp/php-cs-fixer": "^3.0",
5858
"phpmd/phpmd": "^2.4",
5959
"scrutinizer/ocular": "^1.3",

ext_emconf.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
'title' => 'Calendarize - Event Management',
88
'description' => 'Create a structure for timely controlled tables (e.g. events) and one plugin for the different output of calendar views (list, detail, month, year, day, week...). The extension is shipped with one default event table, but you can also "calendarize" your own table/model. It is completely independent and configurable! Use your own models as event items in this calender. Development on https://github.com/lochmueller/calendarize',
99
'category' => 'fe',
10-
'version' => '13.0.7',
10+
'version' => '13.0.0-dev',
1111
'state' => 'stable',
1212
'clearcacheonload' => 1,
1313
'author' => 'Tim Lochmüller',
1414
'author_email' => '[email protected]',
1515
'constraints' => [
1616
'depends' => [
17-
'typo3' => '12.4.0-12.4.99',
18-
'php' => '8.1.0-8.99.99',
17+
'typo3' => '13.4.0-13.4.99',
18+
'php' => '8.2.0-8.3.99',
1919
],
2020
'suggests' => [
2121
'dashboard' => '12.4.0-12.4.99',

ext_localconf.php

-6
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,6 @@
181181
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['calendarize'] =
182182
ProcessDatamapClass::class;
183183

184-
// Include new content elements to modWizards
185-
ExtensionManagementUtility::addPageTSConfig("
186-
@import 'EXT:calendarize/Configuration/TsConfig/Page/Mod/Wizards/NewContentElement.tsconfig'
187-
@import 'EXT:calendarize/Configuration/TsConfig/Page/TCEMAIN/LinkHandler.tsconfig'
188-
");
189-
190184
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1591803668] = [
191185
'nodeName' => 'calendarizeInfoElement',
192186
'priority' => 40,

0 commit comments

Comments
 (0)