File tree Expand file tree Collapse file tree 5 files changed +14
-2
lines changed
Expand file tree Collapse file tree 5 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1515 */
1616class EnrichPageCacheIdentifierParametersEventListener
1717{
18+ /** @phpstan-ignore-next-line @todo Remove this comment when support for TYPO3 v12 is dropped */
1819 public function __invoke (BeforePageCacheIdentifierIsHashedEvent $ beforePageCacheIdentifierIsHashedEvent ): void
1920 {
2021 if (!RouteService::routeHasT3ApiResourceEnhancerQueryParam ()) {
2122 return ;
2223 }
2324
25+ /** @phpstan-ignore-next-line @todo Remove this comment when support for TYPO3 v12 is dropped */
2426 $ beforePageCacheIdentifierIsHashedEvent ->setPageCacheIdentifierParameters ([
27+ /** @phpstan-ignore-next-line @todo Remove this comment when support for TYPO3 v12 is dropped */
2528 ...$ beforePageCacheIdentifierIsHashedEvent ->getPageCacheIdentifierParameters (),
2629 't3api_hash_base_random ' => microtime (),
2730 ]);
Original file line number Diff line number Diff line change 66
77use SourceBroker \T3api \Service \RouteService ;
88
9+ // @todo remove this class when support for TYPO3 v12 is dropped. For TYPO3 >= v13 \SourceBroker\T3api\EventListener\EnrichPageCacheIdentifierParametersEventListener is doing the same job.
910class EnrichHashBase
1011{
1112 /**
Original file line number Diff line number Diff line change 2727 "symfony/property-info" : " ^6.4 || ^7.0" ,
2828 "symfony/psr-http-message-bridge" : " ^6.4 || ^7.0" ,
2929 "symfony/routing" : " ^6.4 || ^7.0" ,
30- "typo3/cms-core" : " ^13 " ,
30+ "typo3/cms-core" : " ^12.4.16 || ^13.3 " ,
3131 "typo3/cms-extbase" : " ^12.4.16 || ^13.3" ,
3232 "typo3/cms-frontend" : " ^12.4.16 || ^13.3"
3333 },
Original file line number Diff line number Diff line change 88 'author ' => 'Inscript Team ' ,
99 'author_email ' =>
'[email protected] ' ,
1010 'state ' => 'stable ' ,
11- 'version ' => '4.1.1 ' ,
11+ 'version ' => '4.1.2 ' ,
1212 'constraints ' => [
1313 'depends ' => [
1414 'php ' => '8.1.0-8.3.99 ' ,
Original file line number Diff line number Diff line change 11<?php
22
33/** @noinspection PhpFullyQualifiedNameUsageInspection */
4+
5+ use TYPO3 \CMS \Core \Information \Typo3Version ;
6+
47defined ('TYPO3 ' ) || die ('Access denied. ' );
58
69call_user_func (
@@ -118,6 +121,11 @@ static function () {
118121 $ GLOBALS ['TYPO3_CONF_VARS ' ]['SC_OPTIONS ' ]['t3lib/class.t3lib_tcemain.php ' ]['clearCachePostProc ' ]['t3api_clearcache ' ] =
119122 \SourceBroker \T3api \Service \SerializerService::class . '->clearCache ' ;
120123
124+ if ((new Typo3Version ())->getMajorVersion () < 13 ) {
125+ $ GLOBALS ['TYPO3_CONF_VARS ' ]['SC_OPTIONS ' ]['tslib/class.tslib_fe.php ' ]['createHashBase ' ]['t3api ' ]
126+ = \SourceBroker \T3api \Hook \EnrichHashBase::class.'->init ' ;
127+ }
128+
121129 $ GLOBALS ['TYPO3_CONF_VARS ' ]['SYS ' ]['routing ' ]['enhancers ' ][\SourceBroker \T3api \Routing \Enhancer \ResourceEnhancer::ENHANCER_NAME ] = \SourceBroker \T3api \Routing \Enhancer \ResourceEnhancer::class;
122130
123131 // protects against "&cHash empty" error when `cacheHash.enforceValidation` is set to `true`
You can’t perform that action at this time.
0 commit comments