Skip to content

Commit fe94302

Browse files
committed
Update dependencies, increase TYPO3 version, increase PHP version
1 parent 11d9baa commit fe94302

16 files changed

+46
-135
lines changed

.github/workflows/Release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v6
2020

2121
- name: Check tag
2222
run: |
@@ -42,7 +42,7 @@ jobs:
4242
- name: Setup PHP
4343
uses: shivammathur/setup-php@v2
4444
with:
45-
php-version: 8.1
45+
php-version: 8.3
4646
extensions: intl, mbstring, json, zip, curl
4747
tools: composer:v2
4848

.github/workflows/test.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
php: [ '8.1', '8.2', '8.3' ]
10-
typo3: [ '12', '13' ]
11-
exclude:
12-
- php: '8.1'
13-
typo3: '13'
9+
php: [ '8.3', '8.4', '8.5' ]
10+
typo3: [ '13', '14' ]
1411
steps:
15-
- uses: actions/checkout@v1
12+
- uses: actions/checkout@v6
1613
- name: Setup PHP with PECL extension
1714
uses: shivammathur/setup-php@v2
1815
with:

Classes/Cache/Listener/CachingAllowedListener.php

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,13 @@
55
namespace SFC\Staticfilecache\Cache\Listener;
66

77
use SFC\Staticfilecache\Event\CacheRuleEvent;
8-
use TYPO3\CMS\Core\Information\Typo3Version;
9-
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
108

119
class CachingAllowedListener
1210
{
13-
public function __construct(private readonly Typo3Version $typo3Version) {}
14-
1511
public function __invoke(CacheRuleEvent $event): void
1612
{
17-
if ($this->typo3Version->getMajorVersion() >= 13) {
18-
/* @phpstan-ignore-next-line */
19-
if (!$event->getRequest()->getAttribute('frontend.cache.instruction')->isCachingAllowed()) {
20-
$event->addExplanation(__CLASS__, 'No caching via frontend.cache.instruction attribute');
21-
}
22-
return;
23-
}
24-
25-
// v12
26-
$tsfe = $GLOBALS['TSFE'] ?? null;
27-
/* @phpstan-ignore-next-line */
28-
if ($tsfe instanceof TypoScriptFrontendController && $tsfe->no_cache) {
29-
$event->addExplanation(__CLASS__, 'config.no_cache is true');
13+
if (!$event->getRequest()->getAttribute('frontend.cache.instruction')->isCachingAllowed()) {
14+
$event->addExplanation(__CLASS__, 'No caching via frontend.cache.instruction attribute');
3015
}
3116
}
3217
}

Classes/Cache/Listener/ForceStaticCacheListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
class ForceStaticCacheListener
1717
{
18-
public function __construct(readonly protected EventDispatcherInterface $eventDispatcher) {}
18+
public function __construct(protected readonly EventDispatcherInterface $eventDispatcher) {}
1919

2020
public function __invoke(CacheRuleEvent $event): void
2121
{

Classes/Controller/BackendController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ class BackendController extends ActionController implements LoggerAwareInterface
3030
use LoggerAwareTrait;
3131

3232
public function __construct(
33-
readonly protected QueueService $queueService,
34-
readonly protected ModuleTemplateFactory $moduleTemplateFactory,
35-
readonly protected ConfigurationService $configurationService,
36-
readonly protected CacheService $cacheService,
33+
protected readonly QueueService $queueService,
34+
protected readonly ModuleTemplateFactory $moduleTemplateFactory,
35+
protected readonly ConfigurationService $configurationService,
36+
protected readonly CacheService $cacheService,
3737
) {}
3838

3939
public function listAction(string $filter = ''): ResponseInterface

Classes/Event/CacheRuleEvent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
final class CacheRuleEvent implements CacheRuleEventInterface
1111
{
1212
public function __construct(
13-
readonly private ServerRequestInterface $request,
13+
private readonly ServerRequestInterface $request,
1414
private array $explanation,
1515
private bool $skipProcessing,
16-
readonly private ResponseInterface $response,
16+
private readonly ResponseInterface $response,
1717
) {}
1818

1919
public function getRequest(): ServerRequestInterface

Classes/Event/CacheRuleFallbackEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
final class CacheRuleFallbackEvent implements CacheRuleEventInterface
1010
{
1111
public function __construct(
12-
readonly private ServerRequestInterface $request,
12+
private readonly ServerRequestInterface $request,
1313
private array $explanation,
1414
private bool $skipProcessing
1515
) {}

Classes/Event/GeneratorCreate.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
final class GeneratorCreate
1010
{
1111
public function __construct(
12-
readonly protected string $entryIdentifier,
13-
readonly protected string $fileName,
14-
readonly protected ResponseInterface $response,
15-
readonly protected int $lifetime
12+
protected readonly string $entryIdentifier,
13+
protected readonly string $fileName,
14+
protected readonly ResponseInterface $response,
15+
protected readonly int $lifetime
1616
) {}
1717

1818
public function getEntryIdentifier(): string

Classes/Event/GeneratorRemove.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
final class GeneratorRemove
88
{
99
public function __construct(
10-
readonly protected string $entryIdentifier,
11-
readonly protected string $fileName,
10+
protected readonly string $entryIdentifier,
11+
protected readonly string $fileName,
1212
) {}
1313

1414
public function getEntryIdentifier(): string

Classes/Event/PreGenerateEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class PreGenerateEvent
1111
{
1212
public function __construct(
1313
private string $uri,
14-
readonly private ServerRequestInterface $request,
14+
private readonly ServerRequestInterface $request,
1515
private ResponseInterface $response
1616
) {}
1717

0 commit comments

Comments
 (0)