diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cf96662..1e85da9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -31,6 +31,7 @@ jobs: php-version: - 8.1 - 8.2 + - 8.3 steps: - name: Checkout uses: actions/checkout@v3 @@ -106,9 +107,11 @@ jobs: matrix: include: - php-version: '8.1' - typo3-version: '^11.5' + typo3-version: '^12.4' - php-version: '8.2' - typo3-version: '^11.5' + typo3-version: '^12.4' + - php-version: '8.3' + typo3-version: '^12.4' steps: - uses: actions/checkout@v3 diff --git a/Classes/Domain/Model/Marker.php b/Classes/Domain/Model/Marker.php index ea9b8e5..f0634db 100644 --- a/Classes/Domain/Model/Marker.php +++ b/Classes/Domain/Model/Marker.php @@ -1,4 +1,5 @@ setCacheLifetime( + min( + $event->getCacheLifetime(), + $this->variablesService->getLifetime(), + ) + ); + } +} diff --git a/Classes/Hooks/ContentProcessor.php b/Classes/Hooks/ContentProcessor.php index 44f4e5f..3b0273c 100644 --- a/Classes/Hooks/ContentProcessor.php +++ b/Classes/Hooks/ContentProcessor.php @@ -1,4 +1,5 @@ variablesService = GeneralUtility::makeInstance(VariablesService::class); } - /** - * Dynamically replaces variables by user content. - */ - public function replaceContent(array &$parameters, TypoScriptFrontendController $parentObject): void + public function __invoke(AfterCacheableContentIsGeneratedEvent $event): void { $extensionConfiguration = GeneralUtility::makeInstance(ExtensionConfiguration::class); - $this->variablesService->initialize($extensionConfiguration, $parentObject); - $this->variablesService->replaceMarkersInStructureAndAdjustCaching($parentObject->content); + $this->variablesService->initialize($extensionConfiguration, $event->getController()); + $this->variablesService->replaceMarkersInStructureAndAdjustCaching($event->getController()->content); } } diff --git a/Classes/Hooks/DataHandler.php b/Classes/Hooks/DataHandler.php index 05e7662..394040a 100644 --- a/Classes/Hooks/DataHandler.php +++ b/Classes/Hooks/DataHandler.php @@ -1,4 +1,5 @@ getMarkerFromHook($params, $dataHandler); + + if (!$marker instanceof \Sinso\Variables\Domain\Model\Marker) { + return; + } + + $cacheTagToFlush = CacheKeyUtility::getCacheKey( + $marker->getMarkerWithBrackets() + ); + + $this->cacheManager->flushCachesInGroupByTag('pages', $cacheTagToFlush); + } + + protected function getMarkerFromHook(array $params, \TYPO3\CMS\Core\DataHandling\DataHandler $dataHandler): ?Marker { if ( - isset($params['table'], $params['uid']) && $params['table'] === 'tx_variables_marker' + ($params['table'] !== 'tx_variables_marker') + || !isset($params['uid']) ) { - $cacheTagsToFlush = []; - if (isset($params['marker'])) { - $cacheTagsToFlush[] = CacheKeyUtility::getCacheKey($params['marker']); - } - - $cacheManager = GeneralUtility::makeInstance(CacheManager::class); - foreach ($cacheTagsToFlush as $cacheTag) { - $cacheManager->flushCachesInGroupByTag('pages', $cacheTag); - } + return null; } + + $marker = $dataHandler->datamap[$params['table']][$params['uid']]['marker'] ?? null; + + if (!$marker) { + $marker = $this->findVariableMarkerByUidEventIfHiddenOrDeleted($params['uid']); + } + + if (!$marker) { + return null; + } + + return new Marker( + uid: $params['uid'], + key: $marker, + replacement: '', // value doesn't matter here + ); + } + + protected function findVariableMarkerByUidEventIfHiddenOrDeleted(int $uid): ?string + { + $queryBuilder = $this->connectionPool->getQueryBuilderForTable('tx_variables_marker'); + $queryBuilder->getRestrictions()->removeAll(); + return $queryBuilder + ->select('marker') + ->from('tx_variables_marker') + ->where( + $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, Connection::PARAM_INT)), + ) + ->executeQuery() + ->fetchOne(); } } diff --git a/Classes/Hooks/MarkersProcessorInterface.php b/Classes/Hooks/MarkersProcessorInterface.php index 5d6b1d6..e6937e4 100644 --- a/Classes/Hooks/MarkersProcessorInterface.php +++ b/Classes/Hooks/MarkersProcessorInterface.php @@ -1,4 +1,5 @@ getTypoScriptFrontendController(); } - if (!$extensionConfiguration) { + if (!$extensionConfiguration instanceof \TYPO3\CMS\Core\Configuration\ExtensionConfiguration) { $extensionConfiguration = GeneralUtility::makeInstance(ExtensionConfiguration::class); } @@ -54,19 +54,17 @@ public function initialize( /** * Iterates over a structure (array, object) and replaces markers in every string found. * - * @param mixed $structure * - * @return void * @throws \Exception */ public function replaceMarkersInStructureAndAdjustCaching( mixed &$structure ): void { - if ($this->markerCollection === null) { + if (!$this->markerCollection instanceof \Sinso\Variables\Domain\Model\MarkerCollection) { throw new \Exception('Markers not initialized. Please run initialize() first.', 1726241619); } $this->replaceMarkersInStructure($structure); - $this->setCacheTagsAndLifetimeInTsfe(); + $this->setCacheTagsInTsfe(); } /** @@ -111,12 +109,18 @@ protected function replaceMarkersInText(string &$text): void } // Assign a cache key associated with the marker - $this->cacheTags->add(CacheKeyUtility::getCacheKey($marker->getMarkerWithBrackets())); + $this->cacheTags->add( + CacheKeyUtility::getCacheKey( + $marker->getMarkerWithBrackets() + ) + ); $this->usedMarkerKeys[] = $marker->key; $text = $newContent; } } + $this->usedMarkerKeys = array_unique($this->usedMarkerKeys); + // Remove all markers (avoids empty entries) if ($this->extensionConfiguration->get('variables', 'removeUnreplacedMarkers')) { $text = preg_replace('/{{.*?}}/', '', $text); @@ -132,8 +136,8 @@ protected function getMarkers(): MarkerCollection return $page['uid']; }, $this->typoScriptFrontendController->rootLine); - if (!empty($this->typoScriptFrontendController->tmpl->setup['plugin.']['tx_variables.']['persistence.']['storagePid'])) { - $pids[] = (int)$this->typoScriptFrontendController->tmpl->setup['plugin.']['tx_variables.']['persistence.']['storagePid']; + if (!empty($GLOBALS['TYPO3_REQUEST']->getAttribute('frontend.typoscript')->getSetupArray()['plugin.']['tx_variables.']['persistence.']['storagePid'])) { + $pids[] = (int)$GLOBALS['TYPO3_REQUEST']->getAttribute('frontend.typoscript')->getSetupArray()['plugin.']['tx_variables.']['persistence.']['storagePid']; } $table = 'tx_variables_marker'; @@ -169,24 +173,30 @@ protected function getMarkers(): MarkerCollection return $markers; } - protected function setCacheTagsAndLifetimeInTsfe(): void + protected function setCacheTagsInTsfe(): void { - $this->usedMarkerKeys = array_unique($this->usedMarkerKeys); - - $minLifetime = min( - $this->getSmallestLifetimeForMarkers($this->usedMarkerKeys), - $this->typoScriptFrontendController->page['cache_timeout'] ?: PHP_INT_MAX - ); - - $this->typoScriptFrontendController->page['cache_timeout'] = $minLifetime; - if (count($this->cacheTags) > 0) { $this->typoScriptFrontendController->addCacheTags($this->cacheTags->toArray()); } } - public function getSmallestLifetimeForMarkers(array $usedMarkerKeys): int + public function getLifetime(): int { + return $this->getNearestTimestampForMarkers($this->usedMarkerKeys) - \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Context\Context::class)->getPropertyFromAspect('date', 'timestamp'); + } + + /** + * Get the nearest timestamp in the future when changes for Markers should happen. + * This respects starttime and endtime. + * The result will be used to calculate the maximal caching duration + * + * @throws \Doctrine\DBAL\Exception + */ + public function getNearestTimestampForMarkers(array $usedMarkerKeys): int + { + // Max value possible to keep an int \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->realPageCacheContent ($timeOutTime = $GLOBALS['EXEC_TIME'] + $cacheTimeout;) + $result = PHP_INT_MAX; + $tableName = 'tx_variables_marker'; $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($tableName)->createQueryBuilder(); $queryBuilder->getRestrictions()->removeAll() @@ -194,11 +204,9 @@ public function getSmallestLifetimeForMarkers(array $usedMarkerKeys): int // Code heavily inspired by: // \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->getFirstTimeValueForRecord - $now = (int)$GLOBALS['ACCESS_TIME']; - // Max value possible to keep an int \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->realPageCacheContent ($timeOutTime = $GLOBALS['EXEC_TIME'] + $cacheTimeout;) - $result = PHP_INT_MAX - $GLOBALS['EXEC_TIME']; + $now = (int)\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Context\Context::class)->getPropertyFromAspect('date', 'timestamp'); $timeFields = []; - $timeConditions = $queryBuilder->expr()->orX(); + $timeConditions = $queryBuilder->expr()->or(); foreach (['starttime', 'endtime'] as $field) { if (isset($GLOBALS['TCA'][$tableName]['ctrl']['enablecolumns'][$field])) { $timeFields[$field] = $GLOBALS['TCA'][$tableName]['ctrl']['enablecolumns'][$field]; @@ -212,7 +220,7 @@ public function getSmallestLifetimeForMarkers(array $usedMarkerKeys): int . ' THEN NULL ELSE ' . $queryBuilder->quoteIdentifier($timeFields[$field]) . ' END' . ') AS ' . $queryBuilder->quoteIdentifier($timeFields[$field]) ); - $timeConditions->add( + $timeConditions->with( $queryBuilder->expr()->gt( $timeFields[$field], $queryBuilder->createNamedParameter($now, \PDO::PARAM_INT) @@ -222,7 +230,7 @@ public function getSmallestLifetimeForMarkers(array $usedMarkerKeys): int } // if starttime or endtime are defined, evaluate them - if (!empty($timeFields)) { + if ($timeFields !== []) { // find the timestamp, when the current page's content changes the next time $queryBuilder ->from($tableName) @@ -235,7 +243,7 @@ public function getSmallestLifetimeForMarkers(array $usedMarkerKeys): int ->fetch(); if ($row) { - foreach ($timeFields as $timeField => $_) { + foreach (array_keys($timeFields) as $timeField) { // if a MIN value is found, take it into account for the // cache lifetime we have to filter out start/endtimes < $now, // as the SQL query also returns rows with starttime < $now diff --git a/Configuration/Services.yaml b/Configuration/Services.yaml index b9baab4..f2115f4 100644 --- a/Configuration/Services.yaml +++ b/Configuration/Services.yaml @@ -7,5 +7,16 @@ services: Sinso\Variables\: resource: '../Classes/*' + Sinso\Variables\Hooks\DataHandler: + public: true + + Sinso\Variables\Hooks\ContentProcessor: + tags: + - name: event.listener + Sinso\Variables\Service\VariablesService: public: true + + Sinso\Variables\EventListener\ModifyCacheLifetime: + tags: + - name: event.listener diff --git a/Configuration/TCA/Overrides/sys_template.php b/Configuration/TCA/Overrides/sys_template.php new file mode 100644 index 0000000..c6a4d8d --- /dev/null +++ b/Configuration/TCA/Overrides/sys_template.php @@ -0,0 +1,3 @@ + 'marker', 'tstamp' => 'tstamp', 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', 'dividers2tabs' => true, 'versioningWS' => true, 'origUid' => 't3_origuid', @@ -28,9 +27,6 @@ 'searchFields' => 'marker,replacement', 'iconfile' => 'EXT:variables/Resources/Public/Icons/tx_variables_marker.png' ], - 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, marker, replacement', - ], 'types' => [ '1' => [ 'showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, @@ -58,25 +54,16 @@ 'sys_language_uid' => [ 'exclude' => 1, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'special' => 'languages', - 'items' => [ - ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], - ], - 'default' => 0, - ] + 'config' => ['type' => 'language'] ], 'l10n_parent' => [ 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'exclude' => 1, 'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', 'config' => [ 'type' => 'select', 'renderType' => 'selectSingle', 'items' => [ - ['', 0], + ['label' => '', 'value' => 0], ], 'default' => 0, 'foreign_table' => 'tx_variables_marker', @@ -108,10 +95,8 @@ 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:starttime_formlabel', 'config' => [ - 'type' => 'input', - 'renderType' => 'inputDateTime', + 'type' => 'datetime', 'size' => 16, - 'eval' => 'datetime,int', 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, @@ -123,10 +108,8 @@ 'l10n_mode' => 'exclude', 'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:endtime_formlabel', 'config' => [ - 'type' => 'input', - 'renderType' => 'inputDateTime', + 'type' => 'datetime', 'size' => 16, - 'eval' => 'datetime,int', 'default' => 0, 'behaviour' => [ 'allowLanguageSynchronization' => true, @@ -140,7 +123,8 @@ 'config' => [ 'type' => 'input', 'size' => 40, - 'eval' => 'required,alphanum_x,upper' //TODO: Restore uniqueInPid. See https://forge.typo3.org/issues/83572 + 'eval' => 'alphanum_x,upper', + 'required' => true //TODO: Restore uniqueInPid. See https://forge.typo3.org/issues/83572 ], ], 'replacement' => [ @@ -150,7 +134,8 @@ 'type' => 'text', 'cols' => 40, 'rows' => 4, - 'eval' => 'required,trim' + 'eval' => 'trim', + 'required' => true ], 'defaultExtras' => $enableRte ? 'richtext:rte_transform[mode=ts_css]' : '', ], diff --git a/Tests/Functional/Caching/FlushViaDataHandlerChangesTest.php b/Tests/Functional/Caching/FlushViaDataHandlerChangesTest.php index 1a76d07..928c921 100644 --- a/Tests/Functional/Caching/FlushViaDataHandlerChangesTest.php +++ b/Tests/Functional/Caching/FlushViaDataHandlerChangesTest.php @@ -27,6 +27,8 @@ use Prophecy\PhpUnit\ProphecyTrait; use Sinso\Variables\Hooks\DataHandler; use TYPO3\CMS\Core\Cache\CacheManager; +use TYPO3\CMS\Core\Database\ConnectionPool; +use TYPO3\CMS\Core\DataHandling\DataHandler as Typo3DataHandler; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; @@ -35,36 +37,26 @@ */ class FlushViaDataHandlerChangesTest extends FunctionalTestCase { - use ProphecyTrait; - - public function testCanBeCreated(): void - { - $subject = new DataHandler(); - - self::assertInstanceOf( - DataHandler::class, - $subject - ); - } - /** * @dataProvider possibleNoneTriggeringParams */ public function testDoesNotInteractWithCacheManagerOnUnkownData(array $params): void { - $cacheManager = $this->prophesize(CacheManager::class); - GeneralUtility::setSingletonInstance(CacheManager::class, $cacheManager->reveal()); - - $subject = new DataHandler(); - $subject->clearCachePostProc($params); - - $cacheManager->flushCachesInGroupByTag('pages', Argument::type('array'))->shouldNotBeCalled(); + $connectionPool = self::createMock(ConnectionPool::class); + $cacheManager = self::createMock(CacheManager::class); + $cacheManager + ->expects(self::never()) + ->method('flushCachesInGroupByTag') + ; + + $subject = new DataHandler($connectionPool, $cacheManager); + $subject->clearCachePostProc($params, self::createStub(Typo3DataHandler::class)); } /** * @return Generator}> */ - public function possibleNoneTriggeringParams(): \Generator + public static function possibleNoneTriggeringParams(): \Generator { yield 'no table given' => [ 'params' => [], @@ -85,16 +77,28 @@ public function possibleNoneTriggeringParams(): \Generator public function testFlushCachesByGroupForMarker(): void { - $cacheManager = $this->prophesize(CacheManager::class); - GeneralUtility::setSingletonInstance(CacheManager::class, $cacheManager->reveal()); + $connectionPool = self::createMock(ConnectionPool::class); + $cacheManager = self::createMock(CacheManager::class); + $cacheManager + ->expects(self::once()) + ->method('flushCachesInGroupByTag') + ->with('pages', $this->stringStartsWith('tx_variables_key_hash_')) + ; + + $dataHandler = self::createStub(Typo3DataHandler::class); + $dataHandler->datamap = [ + 'tx_variables_marker' => [ + 1 => [ + 'marker' => 'TEST', + ], + ], + ]; - $subject = new DataHandler(); + $subject = new DataHandler($connectionPool, $cacheManager); $subject->clearCachePostProc([ 'table' => 'tx_variables_marker', 'uid' => '1', 'marker' => 'TEST' - ]); - - $cacheManager->flushCachesInGroupByTag('pages', 'tx_variables_key_hash_033bd94b1168d7e4f0d644c3c95e35bf')->shouldBeCalledOnce(); + ], $dataHandler); } } diff --git a/Tests/Functional/Fixtures/Frontend/Rendering.typoscript b/Tests/Functional/Fixtures/Frontend/Rendering.typoscript index 277f23d..3e97985 100644 --- a/Tests/Functional/Fixtures/Frontend/Rendering.typoscript +++ b/Tests/Functional/Fixtures/Frontend/Rendering.typoscript @@ -6,3 +6,7 @@ tt_content.template = TEXT tt_content.template.value =

{data.bodytext -> f:format.html()}

plugin.tx_variables.persistence.storagePid = 4 + +lib.parseFunc_RTE { + htmlSanitize = 1 +} diff --git a/Tests/Functional/Frontend/AbstractProcessesMarkersTest.php b/Tests/Functional/Frontend/AbstractProcessesMarkersTestCase.php similarity index 72% rename from Tests/Functional/Frontend/AbstractProcessesMarkersTest.php rename to Tests/Functional/Frontend/AbstractProcessesMarkersTestCase.php index 299a93f..5e45150 100644 --- a/Tests/Functional/Frontend/AbstractProcessesMarkersTest.php +++ b/Tests/Functional/Frontend/AbstractProcessesMarkersTestCase.php @@ -23,21 +23,35 @@ namespace Sinso\Variables\Tests\Functional\Frontend; +use TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend; +use TYPO3\CMS\Core\Utility\ArrayUtility; use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; -abstract class AbstractProcessesMarkersTest extends FunctionalTestCase +abstract class AbstractProcessesMarkersTestCase extends FunctionalTestCase { - protected $testExtensionsToLoad = [ + protected array $testExtensionsToLoad = [ 'typo3conf/ext/variables', ]; - protected $pathsToLinkInTestInstance = [ + protected array $pathsToLinkInTestInstance = [ 'typo3conf/ext/variables/Tests/Functional/Fixtures/Frontend/Sites/' => 'typo3conf/sites', ]; protected function setUp(): void { + ArrayUtility::mergeRecursiveWithOverrule($this->configurationToUseInTestInstance, [ + 'SYS' => [ + 'caching' => [ + 'cacheConfigurations' => [ + 'pages' => [ + 'backend' => Typo3DatabaseBackend::class, + ], + ], + ], + ], + ]); + parent::setUp(); $this->importDataSet('EXT:variables/Tests/Functional/Fixtures/Frontend/Content.xml'); diff --git a/Tests/Functional/Frontend/BreaksOnInvalidHookTest.php b/Tests/Functional/Frontend/BreaksOnInvalidHookTest.php index 319267b..9d2ae96 100644 --- a/Tests/Functional/Frontend/BreaksOnInvalidHookTest.php +++ b/Tests/Functional/Frontend/BreaksOnInvalidHookTest.php @@ -28,9 +28,9 @@ /** * @covers \Sinso\Variables\Service\VariablesService */ -class BreaksOnInvalidHookTest extends AbstractProcessesMarkersTest +class BreaksOnInvalidHookTest extends AbstractProcessesMarkersTestCase { - protected $configurationToUseInTestInstance = [ + protected array $configurationToUseInTestInstance = [ 'EXTCONF' => [ 'variables' => [ 'postProcessMarkers' => [ diff --git a/Tests/Functional/Frontend/ProcessesMarkersHookTest.php b/Tests/Functional/Frontend/ProcessesMarkersHookTest.php index 5ca5f57..7e21f82 100644 --- a/Tests/Functional/Frontend/ProcessesMarkersHookTest.php +++ b/Tests/Functional/Frontend/ProcessesMarkersHookTest.php @@ -28,9 +28,9 @@ /** * @covers \Sinso\Variables\Hooks\ContentProcessor */ -class ProcessesMarkersHookTest extends AbstractProcessesMarkersTest +class ProcessesMarkersHookTest extends AbstractProcessesMarkersTestCase { - protected $configurationToUseInTestInstance = [ + protected array $configurationToUseInTestInstance = [ 'EXTCONF' => [ 'variables' => [ 'postProcessMarkers' => [ diff --git a/Tests/Functional/Frontend/ProcessesMarkersTest.php b/Tests/Functional/Frontend/ProcessesMarkersTest.php index cf07b3e..dd9dc92 100644 --- a/Tests/Functional/Frontend/ProcessesMarkersTest.php +++ b/Tests/Functional/Frontend/ProcessesMarkersTest.php @@ -26,7 +26,7 @@ /** * @covers \Sinso\Variables\Hooks\ContentProcessor */ -class ProcessesMarkersTest extends AbstractProcessesMarkersTest +class ProcessesMarkersTest extends AbstractProcessesMarkersTestCase { public function testNoMarkerAppliedAsNoneExist(): void { diff --git a/composer.json b/composer.json index 825c42c..7caa296 100644 --- a/composer.json +++ b/composer.json @@ -14,14 +14,13 @@ } }, "require": { - "php": ">= 8.1 < 8.3", + "php": ">= 8.1 < 8.4", "ramsey/collection": "^2.0", - "typo3/cms-core": "^11.5" + "typo3/cms-core": "^12.4" }, "require-dev": { "rector/rector": "^0.12.23", - "typo3/testing-framework": "^6.16", - "phpspec/prophecy-phpunit": "^2.0", + "typo3/testing-framework": "^7.0", "symplify/easy-coding-standard": "^12.3" }, "extra": { diff --git a/ext_emconf.php b/ext_emconf.php index 30ae1f3..ce9901c 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -15,7 +15,7 @@ 'author_company' => 'Swisscom (Schweiz) AG', 'constraints' => [ 'depends' => [ - 'typo3' => '11.5.0-12.4.99', + 'typo3' => '12.4.0-12.4.99', 'php' => '8.1.0-8.3.99', ], 'conflicts' => [ diff --git a/ext_localconf.php b/ext_localconf.php index f0be40a..b5a2ee8 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -1,12 +1,13 @@ replaceContent'; + = ContentProcessor::class . '->replaceContent'; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'][$extKey . '_clearcache'] = DataHandler::class . '->clearCachePostProc'; diff --git a/ext_tables.php b/ext_tables.php index d113a65..b00119b 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -6,7 +6,4 @@ (static function ($extKey) { ExtensionManagementUtility::addLLrefForTCAdescr('tx_variables_marker', 'EXT:variables/Resources/Private/Language/locallang_csh_tx_variables_marker.xlf'); - ExtensionManagementUtility::allowTableOnStandardPages('tx_variables_marker'); - - ExtensionManagementUtility::addStaticFile($extKey, 'Configuration/TypoScript', 'Content Variables'); })('variables'); diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ad4632c..d8a68b7 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -3,18 +3,13 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" backupGlobals="false" - backupStaticAttributes="false" bootstrap="vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php" colors="true" - convertErrorsToExceptions="true" - convertWarningsToExceptions="true" - forceCoversAnnotation="false" processIsolation="false" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" - verbose="false" > @@ -23,11 +18,11 @@ - + Classes - +