Skip to content

Commit 062736b

Browse files
Task add compatibility to TYPO3 13.4
1 parent f21fbe0 commit 062736b

26 files changed

+842
-772
lines changed

.github/workflows/php.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "PHP Checks"
1+
name: "Quality Checks"
22

33
on:
44
push:
@@ -13,15 +13,13 @@ env:
1313
jobs:
1414

1515
php-lint:
16-
name: "PHP Lint"
16+
name: "Linting"
1717

1818
runs-on: "ubuntu-latest"
1919

2020
strategy:
2121
matrix:
2222
php-version:
23-
- "7.4"
24-
- "8.0"
2523
- "8.1"
2624
- "8.2"
2725
- "8.3"
@@ -70,13 +68,12 @@ jobs:
7068
matrix:
7169
command:
7270
- "test:phpcs"
71+
- "test:rector"
7372
- "test:phpcompatibility"
7473
- "test:phpcpd"
7574
- "test:phpmd"
7675
- "test:phpstan"
7776
php-version:
78-
- "7.4"
79-
- "8.0"
8077
- "8.1"
8178
- "8.2"
8279
- "8.3"
@@ -85,6 +82,7 @@ jobs:
8582
exclude:
8683
- command: "test:phpcs"
8784
php-version: "8.4"
85+
8886
steps:
8987
-
9088
name: "Checkout"
@@ -130,31 +128,25 @@ jobs:
130128
matrix:
131129
include:
132130
-
133-
typo3-version: "^11.5"
134-
php-version: "7.4"
135-
-
136-
typo3-version: "^11.5"
137-
php-version: "8.0"
138-
-
139-
typo3-version: "^11.5"
131+
typo3-version: "^12.4"
140132
php-version: "8.1"
141133
-
142-
typo3-version: "^11.5"
134+
typo3-version: "^12.4"
143135
php-version: "8.2"
144136
-
145-
typo3-version: "^11.5"
137+
typo3-version: "^12.4"
146138
php-version: "8.3"
147139
-
148140
typo3-version: "^12.4"
149-
php-version: "8.1"
141+
php-version: "8.4"
150142
-
151-
typo3-version: "^12.4"
143+
typo3-version: "^13.4"
152144
php-version: "8.2"
153145
-
154-
typo3-version: "^12.4"
146+
typo3-version: "^13.4"
155147
php-version: "8.3"
156148
-
157-
typo3-version: "^12.4"
149+
typo3-version: "^13.4"
158150
php-version: "8.4"
159151

160152
steps:

.php-cs-fixer.php

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
<?php
22

3-
$header = <<<'EOF'
3+
$header = <<<EOF
4+
Copyright notice
5+
46
(c) DMK E-BUSINESS GmbH <[email protected]>
57
All rights reserved
68
7-
This file is part of TYPO3 CMS-based extension "mkcache_queue" by DMK E-BUSINESS GmbH.
9+
This file is part of the "mkcache_queue" Extension for TYPO3 CMS.
10+
11+
This script is part of the TYPO3 project. The TYPO3 project is
12+
free software; you can redistribute it and/or modify
13+
it under the terms of the GNU General Public License as published by
14+
the Free Software Foundation; either version 2 of the License, or
15+
(at your option) any later version.
16+
17+
GNU Lesser General Public License can be found at
18+
www.gnu.org/licenses/lgpl.html
19+
20+
This script is distributed in the hope that it will be useful,
21+
but WITHOUT ANY WARRANTY; without even the implied warranty of
22+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23+
GNU General Public License for more details.
824
9-
It is free software; you can redistribute it and/or modify it under
10-
the terms of the GNU General Public License, either version 2
11-
of the License, or any later version.
25+
This copyright notice MUST APPEAR in all copies of the script!
1226
EOF;
1327

1428
$finder = \PhpCsFixer\Finder::create()
@@ -22,17 +36,8 @@
2236
->setCacheFile('.Build/.php_cs.cache')
2337
->setFinder($finder)
2438
->setRules([
25-
'@PSR2' => true,
39+
'@PSR12' => true,
2640
'@Symfony' => true,
2741
'header_comment' => ['header' => $header],
28-
'trailing_comma_in_multiline' => [
29-
'after_heredoc' => true,
30-
// no support for "arguments" and "parameters" as we need support for PHP 7.4
31-
'elements' => [
32-
'array_destructuring',
33-
'arrays',
34-
'match',
35-
],
36-
],
3742
])
3843
->setLineEnding("\n");

Classes/Cache/CacheManager.php

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,28 @@
33
declare(strict_types=1);
44

55
/*
6+
* Copyright notice
7+
*
68
* (c) DMK E-BUSINESS GmbH <[email protected]>
79
* All rights reserved
810
*
9-
* This file is part of TYPO3 CMS-based extension "mkcache_queue" by DMK E-BUSINESS GmbH.
11+
* This file is part of the "mkcache_queue" Extension for TYPO3 CMS.
12+
*
13+
* This script is part of the TYPO3 project. The TYPO3 project is
14+
* free software; you can redistribute it and/or modify
15+
* it under the terms of the GNU General Public License as published by
16+
* the Free Software Foundation; either version 2 of the License, or
17+
* (at your option) any later version.
18+
*
19+
* GNU Lesser General Public License can be found at
20+
* www.gnu.org/licenses/lgpl.html
1021
*
11-
* It is free software; you can redistribute it and/or modify it under
12-
* the terms of the GNU General Public License, either version 2
13-
* of the License, or any later version.
22+
* This script is distributed in the hope that it will be useful,
23+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
24+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25+
* GNU General Public License for more details.
26+
*
27+
* This copyright notice MUST APPEAR in all copies of the script!
1428
*/
1529

1630
namespace DMK\MkcacheQueue\Cache;
@@ -21,29 +35,6 @@
2135
use TYPO3\CMS\Core\Utility\GeneralUtility;
2236
use TYPO3Fluid\Fluid\Core\Cache\FluidCacheInterface;
2337

24-
/**
25-
* Copyright notice.
26-
*
27-
* (c) DMK E-BUSINESS GmbH <[email protected]>
28-
* All rights reserved
29-
*
30-
* This script is part of the TYPO3 project. The TYPO3 project is
31-
* free software; you can redistribute it and/or modify
32-
* it under the terms of the GNU General Public License as published by
33-
* the Free Software Foundation; either version 2 of the License, or
34-
* (at your option) any later version.
35-
*
36-
* The GNU General Public License can be found at
37-
* http://www.gnu.org/copyleft/gpl.html.
38-
*
39-
* This script is distributed in the hope that it will be useful,
40-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
41-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42-
* GNU General Public License for more details.
43-
*
44-
* This copyright notice MUST APPEAR in all copies of the script!
45-
*/
46-
4738
/**
4839
* Class CacheManager.
4940
*
@@ -55,8 +46,10 @@ class CacheManager extends \TYPO3\CMS\Core\Cache\CacheManager
5546
{
5647
/**
5748
* @see \TYPO3\CMS\Core\Cache\CacheManager::registerCache()
49+
*
50+
* @param array<string> $groups
5851
*/
59-
public function registerCache(FrontendInterface $cache, array $groups = [])
52+
public function registerCache(FrontendInterface $cache, array $groups = []): void
6053
{
6154
$registry = GeneralUtility::makeInstance(Registry::class);
6255
// The QueueableFrontend does not implement the FluidCacheInterface and therefore can't wrap

Classes/Cache/Frontend/QueueableFrontend.php

Lines changed: 29 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,28 @@
33
declare(strict_types=1);
44

55
/*
6+
* Copyright notice
7+
*
68
* (c) DMK E-BUSINESS GmbH <[email protected]>
79
* All rights reserved
810
*
9-
* This file is part of TYPO3 CMS-based extension "mkcache_queue" by DMK E-BUSINESS GmbH.
11+
* This file is part of the "mkcache_queue" Extension for TYPO3 CMS.
12+
*
13+
* This script is part of the TYPO3 project. The TYPO3 project is
14+
* free software; you can redistribute it and/or modify
15+
* it under the terms of the GNU General Public License as published by
16+
* the Free Software Foundation; either version 2 of the License, or
17+
* (at your option) any later version.
18+
*
19+
* GNU Lesser General Public License can be found at
20+
* www.gnu.org/licenses/lgpl.html
1021
*
11-
* It is free software; you can redistribute it and/or modify it under
12-
* the terms of the GNU General Public License, either version 2
13-
* of the License, or any later version.
22+
* This script is distributed in the hope that it will be useful,
23+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
24+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25+
* GNU General Public License for more details.
26+
*
27+
* This copyright notice MUST APPEAR in all copies of the script!
1428
*/
1529

1630
namespace DMK\MkcacheQueue\Cache\Frontend;
@@ -21,29 +35,6 @@
2135
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
2236
use TYPO3\CMS\Core\Utility\GeneralUtility;
2337

24-
/**
25-
* Copyright notice.
26-
*
27-
* (c) DMK E-BUSINESS GmbH <[email protected]>
28-
* All rights reserved
29-
*
30-
* This script is part of the TYPO3 project. The TYPO3 project is
31-
* free software; you can redistribute it and/or modify
32-
* it under the terms of the GNU General Public License as published by
33-
* the Free Software Foundation; either version 2 of the License, or
34-
* (at your option) any later version.
35-
*
36-
* The GNU General Public License can be found at
37-
* http://www.gnu.org/copyleft/gpl.html.
38-
*
39-
* This script is distributed in the hope that it will be useful,
40-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
41-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42-
* GNU General Public License for more details.
43-
*
44-
* This copyright notice MUST APPEAR in all copies of the script!
45-
*/
46-
4738
/**
4839
* Class QueueableFrontend.
4940
*
@@ -53,27 +44,15 @@
5344
*/
5445
class QueueableFrontend implements FrontendInterface
5546
{
56-
/**
57-
* @var FrontendInterface
58-
*/
59-
protected $actualCache;
60-
61-
/**
62-
* @var ExtensionConfiguration
63-
*/
64-
protected $extensionConfiguration;
47+
protected ExtensionConfiguration $extensionConfiguration;
6548

66-
/**
67-
* @var Queue
68-
*/
69-
protected $queue;
49+
protected Queue $queue;
7050

7151
public function __construct(
72-
FrontendInterface $actualCache,
52+
protected FrontendInterface $actualCache,
7353
?ExtensionConfiguration $extensionConfiguration = null,
74-
?Queue $queue = null
54+
?Queue $queue = null,
7555
) {
76-
$this->actualCache = $actualCache;
7756
$this->extensionConfiguration = $extensionConfiguration
7857
?? GeneralUtility::makeInstance(ExtensionConfiguration::class);
7958
$this->queue = $queue ?? GeneralUtility::makeInstance(Queue::class);
@@ -158,8 +137,10 @@ public function getBackend(): BackendInterface
158137

159138
/**
160139
* @see FrontendInterface::getIdentifier()
140+
*
141+
* @param array<string> $tags
161142
*/
162-
public function set($entryIdentifier, $data, array $tags = [], $lifetime = null)
143+
public function set($entryIdentifier, $data, array $tags = [], $lifetime = null): void
163144
{
164145
$this->actualCache->set($entryIdentifier, $data, $tags, $lifetime);
165146
}
@@ -204,7 +185,10 @@ public function isValidTag($tag): bool
204185
return $this->actualCache->isValidTag($tag);
205186
}
206187

207-
public function __call($name, $arguments)
188+
/**
189+
* @param array<mixed, mixed> $arguments
190+
*/
191+
public function __call(string $name, array $arguments): mixed
208192
{
209193
return $this->actualCache->$name(...$arguments);
210194
}

0 commit comments

Comments
 (0)