From 09632eefd5af2e8591aef3359e00fe62eacbd5b0 Mon Sep 17 00:00:00 2001 From: Benni Mack <benni@typo3.org> Date: Wed, 19 Dec 2018 20:46:45 +0100 Subject: [PATCH] [!!!][TASK] Remove deprecated code related to TSFE The following code related to TSFE has been removed: PHP classes: * TYPO3\CMS\Core\PageTitle\AltPageTitleProvider * TYPO3\CMS\Frontend\Page\ExternalPageUrlHandler * TYPO3\CMS\Frontend\Page\PageGenerator * TYPO3\CMS\Frontend\Page\EidUtility PHP interfaces: * TYPO3\CMS\Frontend\Http\UrlHandlerInterface Methods that have been marked as protected * tempPageCacheContent() * realPageCacheContent() * setPageCacheContent() * clearPageCacheContent_pidList() * setSysLastChanged() * contentStrReplace() Dropped TSFE methods * mergingWithGetVars() * connectToDB() * initFEuser() * checkAlternativeIdMethods() * initializeBackendUser() * getPageShortcut() * pageUnavailableAndExit() * pageNotFoundAndExit() * checkPageUnavailableHandler() * pageUnavailableHandler() * pageNotFoundHandler() * pageErrorHandler() * makeCacheHash() * initTemplate() * handleDataSubmission() * initializeRedirectUrlHandlers() * redirectToExternalUrl() * checkPageForMountpointRedirect() * checkPageForShortcutRedirect() * redirectToCurrentPage() * processOutput() * sendCacheHeaders() * sendHttpHeadersDirectly() * storeSessionData() * previewInfo() * hook_eofe() * addTempContentHttpHeaders() * setCSS() * getUniqueId() * readLLfile() * getLLL() * initLLvars() * convPOSTCharset() * convertCharsetRecursivelyToUtf8() * domainNameMatchesCurrentRequest() * getDomainDataForPid() * getDomainNameForPid() Dropped TSFE properties * activeUrlHandlers * page_cache_reg1 * siteScript * loginUser * gr_list * beUserLogin * workspacePreview * ADMCMD_preview_BEUSER_uid * showHiddenPage * showHiddenRecords * debug * MP_defaults * sys_language_uid * sys_language_mode * sys_language_content * sys_language_contentOL * altPageTitle * lang TSFE Properties now marked as protected * loginAllowedInBranch * loginAllowedInBranch_mode * cacheTimeOutDefault * cacheContentFlag * cacheExpires * isClientCachable * no_cacheBeforePageGen * tempContent * pagesTSconfig * pageCacheTags * uniqueCounter * uniqueString * pageAccessFailureHistory TSFE Method Signature changes * calculateLinkVars now 1st parameter is required * preparePageContentGeneration now 1st parameter is required 4th Parameter of TSFE->__construct() now unused Removed TypoScript * config.typolinkCheckRootline * config.titleTagFunction * config.USERUID_substToken * config.USERNAME_substToken Hooks $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-PostProc'] Database fields: * index_phash.data_page_reg1 Resolves: #87235 Releases: master Change-Id: Id95bb0ccb30852fd115fb9da7754fa2e64374a41 Reviewed-on: https://review.typo3.org/59226 Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Georg Ringer <georg.ringer@gmail.com> Tested-by: Georg Ringer <georg.ringer@gmail.com> Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de> --- .../PageTitle/AltPageTitleProvider.php | 39 - ...g-87193-DeprecatedFunctionalityRemoved.rst | 97 +- typo3/sysext/core/ext_localconf.php | 14 +- .../TypoScriptFrontendController.php | 1617 +---------------- .../frontend/Classes/Http/RequestHandler.php | 37 - .../Classes/Http/UrlHandlerInterface.php | 46 - .../Classes/Middleware/PageResolver.php | 3 - .../PrepareTypoScriptFrontendRendering.php | 3 - .../Middleware/SiteBaseRedirectResolver.php | 1 + .../Classes/Page/ExternalPageUrlHandler.php | 73 - .../frontend/Classes/Page/PageGenerator.php | 1049 ----------- .../frontend/Classes/Page/PageRepository.php | 1 - .../frontend/Classes/Utility/EidUtility.php | 148 -- .../TypoScriptFrontendControllerTest.php | 94 - .../UnitDeprecated/Page/PageGeneratorTest.php | 366 ---- .../Repository/AdministrationRepository.php | 8 - .../Repository/IndexSearchRepository.php | 4 - .../sysext/indexed_search/Classes/Indexer.php | 9 - typo3/sysext/indexed_search/ext_tables.sql | 1 - .../ExtensionScanner/Php/ClassNameMatcher.php | 17 + .../Php/MethodArgumentRequiredMatcher.php | 6 +- .../Php/MethodArgumentUnusedMatcher.php | 1 + .../Php/MethodCallMatcher.php | 40 +- .../Php/MethodCallStaticMatcher.php | 4 + .../Php/PropertyProtectedMatcher.php | 17 + .../Php/PropertyPublicMatcher.php | 28 +- .../t3editor/Resources/Private/tsref.xml | 80 - .../JavaScript/Mode/typoscript/typoscript.js | 5 - 28 files changed, 217 insertions(+), 3591 deletions(-) delete mode 100644 typo3/sysext/core/Classes/PageTitle/AltPageTitleProvider.php delete mode 100644 typo3/sysext/frontend/Classes/Http/UrlHandlerInterface.php delete mode 100644 typo3/sysext/frontend/Classes/Page/ExternalPageUrlHandler.php delete mode 100644 typo3/sysext/frontend/Classes/Page/PageGenerator.php delete mode 100644 typo3/sysext/frontend/Classes/Utility/EidUtility.php delete mode 100644 typo3/sysext/frontend/Tests/UnitDeprecated/Controller/TypoScriptFrontendControllerTest.php delete mode 100644 typo3/sysext/frontend/Tests/UnitDeprecated/Page/PageGeneratorTest.php diff --git a/typo3/sysext/core/Classes/PageTitle/AltPageTitleProvider.php b/typo3/sysext/core/Classes/PageTitle/AltPageTitleProvider.php deleted file mode 100644 index 0128d505b9ce..000000000000 --- a/typo3/sysext/core/Classes/PageTitle/AltPageTitleProvider.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -declare(strict_types = 1); - -namespace TYPO3\CMS\Core\PageTitle; - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -/** - * Class to handle $GLOBALS['TSFE']->altPageTitle as input for the page title - * - * @deprecated since TYPO3 v9.4 and will be removed in TYPO3 v10.0 - */ -class AltPageTitleProvider extends AbstractPageTitleProvider -{ - /** - * @return string - */ - public function getTitle(): string - { - if (!empty($GLOBALS['TSFE']->altPageTitle)) { - trigger_error('$TSFE->altPageTitle will be removed in TYPO3 v10.0. Please use the TitleTag API to set the title tag.', E_USER_DEPRECATED); - - return $GLOBALS['TSFE']->altPageTitle; - } - - return ''; - } -} diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst index 7a68402615b7..4da0a7900b13 100644 --- a/typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-87193-DeprecatedFunctionalityRemoved.rst @@ -27,11 +27,15 @@ The following PHP classes that have been previously deprecated for v9 have been * :php:`TYPO3\CMS\Core\Integrity\DatabaseIntegrityCheck` * :php:`TYPO3\CMS\Core\Log\Writer\RuntimeCacheWriter` * :php:`TYPO3\CMS\Core\Package\DependencyResolver` +* :php:`TYPO3\CMS\Core\PageTitle\AltPageTitleProvider` * :php:`TYPO3\CMS\Core\Resource\Service\UserStorageCapabilityService` * :php:`TYPO3\CMS\Core\Resource\Utility\BackendUtility` * :php:`TYPO3\CMS\Core\Utility\ClientUtility` * :php:`TYPO3\CMS\Core\Utility\PhpOptionsUtility` * :php:`TYPO3\CMS\Frontend\Http\EidRequestHandler` +* :php:`TYPO3\CMS\Frontend\Page\ExternalPageUrlHandler` +* :php:`TYPO3\CMS\Frontend\Page\PageGenerator` +* :php:`TYPO3\CMS\Frontend\Utility\EidUtility` * :php:`TYPO3\CMS\Recordlist\Controller\ElementBrowserFramesetController` * :php:`TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList` * :php:`TYPO3\CMS\Workspaces\Service\AutoPublishService` @@ -43,6 +47,7 @@ The following PHP interfaces that have been previously deprecated for v9 have be * :php:`TYPO3\CMS\Adminpanel\View\AdminPanelViewHookInterface` * :php:`TYPO3\CMS\Core\Crypto\PasswordHashing\ComposedPasswordHashInterface` +* :php:`TYPO3\CMS\Frontend\Http\UrlHandlerInterface` The following PHP class aliases that have been previously deprecated for v9 have been removed: @@ -218,6 +223,43 @@ The following PHP class methods that have been previously deprecated for v9 have * :php:`TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap_addParams()` * :php:`TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap_filelink()` * :php:`TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap_filelist()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->addTempContentHttpHeaders()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->checkAlternativeIdMethods()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->checkPageForMountpointRedirect()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->checkPageForShortcutRedirect()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->checkPageUnavailableHandler()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->connectToDB()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->convertCharsetRecursivelyToUtf8()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->convPOSTCharset()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->domainNameMatchesCurrentRequest()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->getDomainDataForPid()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->getDomainNameForPid()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->getLLL()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->getPageShortcut()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->getUniqueId()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->handleDataSubmission()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->hook_eofe()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->initFEuser()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->initializeBackendUser()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->initializeRedirectUrlHandlers()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->initLLvars()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->initTemplate()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->makeCacheHash()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->mergingWithGetVars()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pageErrorHandler()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pageNotFoundAndExit()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pageNotFoundHandler()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pageUnavailableAndExit()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pageUnavailableHandler()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->previewInfo()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->processOutput()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->readLLfile()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->redirectToCurrentPage()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->redirectToExternalUrl()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->sendCacheHeaders()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->sendHttpHeadersDirectly()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->setCSS()` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->storeSessionData()` * :php:`TYPO3\CMS\Frontend\Page\PageRepository->getFirstWebPage()` * :php:`TYPO3\CMS\Frontend\Page\PageRepository->getDomainStartPage()` * :php:`TYPO3\CMS\Frontend\Page\PageRepository->getRootLine()` @@ -263,6 +305,10 @@ The following methods changed signature according to previous deprecations in v9 * :php:`TYPO3\CMS\Core\Utility\GeneralUtility->getUrl()` - Third argument must be an array of arrays if given * :php:`TYPO3\CMS\Core\Utility\GeneralUtility->mkdir_deep()` - Second argument dropped * :php:`TYPO3\CMS\Frontend\Page\PageRepository->getRawRecord()` - Fourth argument dropped +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->__construct()` - Fourth argument unused +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->calculateLinkVars()` - First argument mandatory +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->preparePageContentGeneration()` - First argument mandatory + The following public class properties have been dropped: @@ -278,6 +324,24 @@ The following public class properties have been dropped: * :php:`TYPO3\CMS\Core\TypoScript\TemplateService->frames` * :php:`TYPO3\CMS\Core\TypoScript\TemplateService->MPmap` * :php:`TYPO3\CMS\Core\TypoScript\TemplateService->whereClause` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->activeUrlHandlers` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->ADMCMD_preview_BEUSER_uid` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->altPageTitle` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->beUserLogin` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->debug` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->gr_list` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->lang` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->loginUser` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->MP_defaults` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->page_cache_reg1` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->showHiddenPage` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->showHiddenRecords` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->siteScript` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->sys_language_content` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->sys_language_contentOL` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->sys_language_mode` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->sys_language_uid` +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->workspacePreview` * :php:`TYPO3\CMS\Frontend\Page\PageRepository->error_getRootLine_failPid` * :php:`TYPO3\CMS\Frontend\Page\PageRepository->error_getRootLine` * :php:`TYPO3\CMS\Frontend\Page\PageRepository->versioningPreview` @@ -300,6 +364,12 @@ The following class methods have changed visibility: * :php:`TYPO3\CMS\Core\TypoScript\TemplateService->processIncludes()` changed from public to protected * :php:`TYPO3\CMS\Core\TypoScript\TemplateService->substituteConstants()` changed from public to protected * :php:`TYPO3\CMS\Core\TypoScript\TemplateService->versionOL()` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->clearPageCacheContent_pidList()` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->contentStrReplace()` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->realPageCacheContent()` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->setPageCacheContent()` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->setSysLastChanged()` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->tempPageCacheContent()` changed from public to protected The following class properties have changed visibility: @@ -320,7 +390,19 @@ The following class properties have changed visibility: * :php:`TYPO3\CMS\Core\TypoScript\TemplateService->sectionsMatch` changed from public to protected * :php:`TYPO3\CMS\Core\TypoScript\TemplateService->simulationHiddenOrTime` changed from public to protected * :php:`TYPO3\CMS\Core\TypoScript\TemplateService->sitetitle` changed from public to protected - +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->cacheContentFlag` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->cacheExpires` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->cacheTimeOutDefault` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->isClientCachable` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->loginAllowedInBranch` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->loginAllowedInBranch_mode` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->no_cacheBeforePageGen` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pageAccessFailureHistory` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pageCacheTags` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pagesTSconfig` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->tempContent` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->uniqueCounter` changed from public to protected +* :php:`TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->uniqueString` changed from public to protected The following scheduler tasks have been removed: @@ -336,6 +418,13 @@ The following user TSconfig options have been dropped: The following TypoScript options have been dropped: +* `config.concatenateJsAndCss` +* `config.titleTagFunction` +* `config.typolinkCheckRootline` +* `config.USERNAME_substToken` +* `config.USERUID_substToken` +* `page.javascriptLibs` +* `page.javascriptLibs.jQuery` * `stdWrap.addParams` * `stdWrap.filelink` * `stdWrap.filelist` @@ -383,11 +472,12 @@ The following global variables have been removed: The following hooks have been removed: * :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preBeUser']` +* :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest']` * :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc']` * :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission']` -* :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest']` * :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB']` * :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo']` +* :php:`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-PostProc']` The following feature is now always enabled: @@ -402,6 +492,9 @@ The following features have been removed: `$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['my_eID'] = 'EXT:benni/Scripts/download.php'` will not work anymore. Instead, they must contain a target (callable, class/method, function). +The following database fields have been removed: + +* `index_phash.data_page_reg1` Impact ====== diff --git a/typo3/sysext/core/ext_localconf.php b/typo3/sysext/core/ext_localconf.php index d441fc77f8de..090f1284d245 100644 --- a/typo3/sysext/core/ext_localconf.php +++ b/typo3/sysext/core/ext_localconf.php @@ -141,14 +141,6 @@ $metaTagManagerRegistry->registerManager( unset($metaTagManagerRegistry); // Add module configuration -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(trim(' - config.pageTitleProviders { - altPageTitle { - provider = TYPO3\CMS\Core\PageTitle\AltPageTitleProvider - before = record - } - record { - provider = TYPO3\CMS\Core\PageTitle\RecordPageTitleProvider - } - } -')); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup( + 'config.pageTitleProviders.record.provider = TYPO3\CMS\Core\PageTitle\RecordPageTitleProvider' +); diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php index d5fc4716f23d..ea833dea6785 100644 --- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php +++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php @@ -14,13 +14,11 @@ namespace TYPO3\CMS\Frontend\Controller; * The TYPO3 project - inspiring people to share! */ -use Doctrine\DBAL\DBALException; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use TYPO3\CMS\Backend\FrontendBackendUserAuthentication; -use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; use TYPO3\CMS\Core\Cache\CacheManager; use TYPO3\CMS\Core\Charset\CharsetConverter; use TYPO3\CMS\Core\Charset\UnknownCharsetException; @@ -32,7 +30,6 @@ use TYPO3\CMS\Core\Context\LanguageAspectFactory; use TYPO3\CMS\Core\Context\UserAspect; use TYPO3\CMS\Core\Context\VisibilityAspect; use TYPO3\CMS\Core\Context\WorkspaceAspect; -use TYPO3\CMS\Core\Controller\ErrorPageController; use TYPO3\CMS\Core\Core\Environment; use TYPO3\CMS\Core\Database\ConnectionPool; use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction; @@ -43,17 +40,14 @@ use TYPO3\CMS\Core\Error\Http\ServiceUnavailableException; use TYPO3\CMS\Core\Error\Http\ShortcutTargetPageNotFoundException; use TYPO3\CMS\Core\Exception\Page\RootLineException; use TYPO3\CMS\Core\Http\ImmediateResponseException; -use TYPO3\CMS\Core\Http\ServerRequestFactory; use TYPO3\CMS\Core\Localization\LanguageService; use TYPO3\CMS\Core\Locking\Exception\LockAcquireWouldBlockException; use TYPO3\CMS\Core\Locking\LockFactory; use TYPO3\CMS\Core\Locking\LockingStrategyInterface; -use TYPO3\CMS\Core\Log\LogManager; use TYPO3\CMS\Core\Page\PageRenderer; use TYPO3\CMS\Core\PageTitle\PageTitleProviderManager; use TYPO3\CMS\Core\Resource\StorageRepository; use TYPO3\CMS\Core\Routing\PageArguments; -use TYPO3\CMS\Core\Service\DependencyOrderingService; use TYPO3\CMS\Core\Site\Entity\Site; use TYPO3\CMS\Core\Site\Entity\SiteLanguage; use TYPO3\CMS\Core\TimeTracker\TimeTracker; @@ -69,10 +63,7 @@ use TYPO3\CMS\Core\Utility\PathUtility; use TYPO3\CMS\Core\Utility\RootlineUtility; use TYPO3\CMS\Extbase\Object\ObjectManager; use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication; -use TYPO3\CMS\Frontend\Compatibility\LegacyDomainResolver; use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; -use TYPO3\CMS\Frontend\Http\UrlHandlerInterface; -use TYPO3\CMS\Frontend\Page\CacheHashCalculator; use TYPO3\CMS\Frontend\Page\PageAccessFailureReasons; use TYPO3\CMS\Frontend\Page\PageRepository; use TYPO3\CMS\Frontend\Resource\FilePathSanitizer; @@ -97,16 +88,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface use LoggerAwareTrait; use PublicMethodDeprecationTrait; - protected $deprecatedPublicMethods = [ - 'tempPageCacheContent' => 'Using $TSFE->tempPageCacheContent() has been marked as internal as its purpose is to be managed from within TSFE directly.', - 'realPageCacheContent' => 'Using $TSFE->realPageCacheContent() has been marked as internal as its purpose is to be managed from within TSFE directly.', - 'setPageCacheContent' => 'Using $TSFE->setPageCacheContent() has been marked as internal as its purpose is to be managed from within TSFE directly.', - 'clearPageCacheContent_pidList' => 'Using $TSFE->clearPageCacheContent_pidList() has been marked as internal as its purpose is to be managed from within TSFE directly.', - 'setSysLastChanged' => 'Using $TSFE->setSysLastChanged() has been marked as internal as its purpose is to be managed from within TSFE directly.', - 'contentStrReplace' => 'Using $TSFE->contentStrReplace() has been marked as internal as its purpose is to be managed from within TSFE directly.', - 'mergingWithGetVars' => '$TSFE->mergingWithGetVars() will be removed in TYPO3 v10.0. Use a middleware instead to override the PSR-7 request object AND set $_GET on top to achieve the same result.', - ]; - /** * The page id (int) * @var string @@ -184,17 +165,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ public $sys_page = ''; - /** - * Contains all URL handler instances that are active for the current request. - * - * The methods isGeneratePage(), isOutputting() and isINTincScript() depend on this property. - * - * @var \TYPO3\CMS\Frontend\Http\UrlHandlerInterface[] - * @see initializeRedirectUrlHandlers() - * @deprecated since TYPO3 v9.3, will be removed in TYPO3 v10.0. - */ - protected $activeUrlHandlers = []; - /** * Is set to 1 if a pageNotFound handler could have been called. * @var int @@ -212,7 +182,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface /** * Array containing a history of why a requested page was not accessible. * @var array - * @deprecated this value has a protected visibility now, as it is only used for internal purpose. Use "getPageAccessFailureReasons()" instead. */ protected $pageAccessFailureHistory = []; @@ -222,24 +191,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ public $MP = ''; - /** - * This can be set from applications as a way to tag cached versions of a page - * and later perform some external cache management, like clearing only a part - * of the cache of a page... - * @var int - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. - */ - public $page_cache_reg1 = 0; - - /** - * Contains the value of the current script path that activated the frontend. - * Typically "index.php" but by rewrite rules it could be something else! Used - * for Speaking Urls / Simulate Static Documents. - * @var string - * @internal - */ - public $siteScript = ''; - /** * The frontend user * @@ -247,39 +198,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ public $fe_user = ''; - /** - * Global flag indicating that a frontend user is logged in. This is set only if - * a user really IS logged in. The group-list may show other groups (like added - * by IP filter or so) even though there is no user. - * @var bool - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. User the information within the context "frontend.user" aspect. - */ - protected $loginUser = false; - - /** - * (RO=readonly) The group list, sorted numerically. Group '0,-1' is the default - * group, but other groups may be added by other means than a user being logged - * in though... - * @var string - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. User the information within the context "frontend.user" aspect. - */ - protected $gr_list = ''; - - /** - * Flag that indicates if a backend user is logged in! - * @var bool - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. User the information within the context "backend.user" aspect. - */ - protected $beUserLogin = false; - - /** - * Integer, that indicates which workspace is being previewed. - * Not in use anymore, as this is part of the workspace preview functionality, use $TSFE->whichWorkspace() instead. - * @var int - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. User the information within the context "workspace" aspect. - */ - protected $workspacePreview = 0; - /** * Shows whether logins are allowed in branch * @var bool @@ -293,13 +211,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ protected $loginAllowedInBranch_mode = ''; - /** - * Set to backend user ID to initialize when keyword-based preview is used - * @var int - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. User the information within the context "backend.user" aspect. - */ - protected $ADMCMD_preview_BEUSER_uid = 0; - /** * Flag indication that preview is active. This is based on the login of a * backend user and whether the backend user has read access to the current @@ -309,23 +220,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ public $fePreview = 0; - /** - * Flag indicating that hidden pages should be shown, selected and so on. This - * goes for almost all selection of pages! - * @var bool - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. User the information within the context "visibility" aspect. - */ - protected $showHiddenPage = false; - - /** - * Flag indicating that hidden records should be shown. This includes - * sys_template and even fe_groups in addition to all - * other regular content. So in effect, this includes everything except pages. - * @var bool - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. User the information within the context "visibility" aspect. - */ - protected $showHiddenRecords = false; - /** * Value that contains the simulated usergroup if any * @var int @@ -508,13 +402,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ public $divSection = ''; - /** - * Debug flag. If TRUE special debug-output maybe be shown (which includes html-formatting). - * @var bool - * @deprecated this property is not in use anymore and will be removed in TYPO3 v10.0. - */ - protected $debug = false; - /** * Default internal target * @var string @@ -533,14 +420,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ public $fileTarget = ''; - /** - * Keys are page ids and values are default &MP (mount point) values to set - * when using the linking features...) - * @var array - * @deprecated this property is not in use anymore and will be removed in TYPO3 v10.0. - */ - protected $MP_defaults = []; - /** * If set, typolink() function encrypts email addresses. Is set in pagegen-class. * @var string|int @@ -599,43 +478,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ public $displayFieldEditIcons = ''; - /** - * Site language, 0 (zero) is default, int+ is uid pointing to a sys_language - * record. Should reflect which language menus, templates etc is displayed in - * (master language) - but not necessarily the content which could be falling - * back to default (see sys_language_content) - * @var int - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0 - use LanguageAspect->getId() instead. - */ - protected $sys_language_uid = 0; - - /** - * Site language mode for content fall back. - * @var string - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0 - use LanguageAspect->getFallbackChain() instead. - */ - protected $sys_language_mode = ''; - - /** - * Site content selection uid (can be different from sys_language_uid if content - * is to be selected from a fall-back language. Depends on sys_language_mode) - * @var int - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0 - use LanguageAspect->getContentId() instead. - */ - protected $sys_language_content = 0; - - /** - * Site content overlay flag; If set - and sys_language_content is > 0 - , - * records selected will try to look for a translation pointing to their uid. (If - * configured in [ctrl][languageField] / [ctrl][transOrigP...] - * Possible values: [0,1,hideNonTranslated] - * This flag is set based on TypoScript config.sys_language_overlay setting - * - * @var int|string - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0 - use LanguageAspect->getOverlayType() instead. - */ - protected $sys_language_contentOL = 0; - /** * Is set to the iso code of the sys_language_content if that is properly defined * by the sys_language record representing the sys_language_uid. @@ -727,27 +569,12 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ public $indexedDocTitle = ''; - /** - * Alternative page title (normally the title of the page record). Can be set - * from applications you make. - * @var string - * @internal - */ - public $altPageTitle = ''; - /** * The base URL set for the page header. * @var string */ public $baseUrl = ''; - /** - * IDs we already rendered for this page (to make sure they are unique) - * @var array - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0 - */ - private $usedUniqueIds = []; - /** * Page content render object * @@ -769,13 +596,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ public $metaCharset = 'utf-8'; - /** - * Set to the system language key (used on the site) - * @var string - * @internal - */ - protected $lang = ''; - /** * Internal calculations for labels * @@ -806,13 +626,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ protected $pageCacheTags = []; - /** - * The cHash Service class used for cHash related functionality - * - * @var CacheHashCalculator - */ - protected $cacheHash; - /** * Content type HTTP header being sent in the request. * @todo Ticket: #63642 Should be refactored to a request/response model later @@ -858,42 +671,20 @@ class TypoScriptFrontendController implements LoggerAwareInterface * @param array $_ unused, previously defined to set TYPO3_CONF_VARS * @param mixed $id The value of GeneralUtility::_GP('id') * @param int $type The value of GeneralUtility::_GP('type') - * @param bool|string $no_cache The value of GeneralUtility::_GP('no_cache'), evaluated to 1/0, will be unused in TYPO3 v10.0. + * @param bool|string $_1 unused, previously the value of GeneralUtility::_GP('no_cache') * @param string $cHash The value of GeneralUtility::_GP('cHash') * @param string $_2 previously was used to define the jumpURL * @param string $MP The value of GeneralUtility::_GP('MP') */ - public function __construct($_ = null, $id, $type, $no_cache = null, $cHash = '', $_2 = null, $MP = '') + public function __construct($_ = null, $id, $type, $_1 = null, $cHash = '', $_2 = null, $MP = '') { // Setting some variables: $this->id = $id; $this->type = $type; - if ($no_cache !== null) { - trigger_error('Calling TypoScriptFrontendController->__construct() with $no_cache argument set will be removed in TYPO3 v10.0. Use ->set_no_cache() instead.', E_USER_DEPRECATED); - if ($no_cache) { - if ($GLOBALS['TYPO3_CONF_VARS']['FE']['disableNoCacheParameter']) { - $warning = '&no_cache=1 has been ignored because $TYPO3_CONF_VARS[\'FE\'][\'disableNoCacheParameter\'] is set!'; - $this->getTimeTracker()->setTSlogMessage($warning, 2); - } else { - $warning = '&no_cache=1 has been supplied, so caching is disabled! URL: "' . GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL') . '"'; - $this->disableCache(); - } - // note: we need to instantiate the logger manually here since the injection happens after the constructor - GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__)->warning($warning); - } - } $this->cHash = $cHash; $this->MP = $GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids'] ? (string)$MP : ''; $this->uniqueString = md5(microtime()); $this->initPageRenderer(); - // Call post processing function for constructor: - if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-PostProc'])) { - trigger_error('The "tslib_fe-PostProc" hook will be removed in TYPO3 v10.0 in favor of PSR-15. Use a middleware instead.', E_USER_DEPRECATED); - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-PostProc'] as $_funcRef) { - GeneralUtility::callUserFunction($_funcRef, $_params, $this); - } - } - $this->cacheHash = GeneralUtility::makeInstance(CacheHashCalculator::class); $this->initCaches(); // Use the global context for now $this->context = GeneralUtility::makeInstance(Context::class); @@ -920,48 +711,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface $this->contentType = $contentType; } - /** - * Connect to SQL database. May exit after outputting an error message - * or some JavaScript redirecting to the install tool. - * - * @throws \RuntimeException - * @throws ServiceUnavailableException - * @deprecated since TYPO3 v9.3, will be removed in TYPO3 v10.0. - */ - public function connectToDB() - { - trigger_error('The method "' . __METHOD__ . '" will be removed in TYPO3 v10.0, as the database connection is checked in the TypoScriptFrontendInitialization middleware.', E_USER_DEPRECATED); - try { - $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('pages'); - $connection->connect(); - } catch (DBALException $exception) { - // Cannot connect to current database - $message = sprintf( - 'Cannot connect to the configured database. Connection failed with: "%s"', - $exception->getMessage() - ); - $this->logger->emergency($message, ['exception' => $exception]); - try { - $response = GeneralUtility::makeInstance(ErrorController::class)->unavailableAction( - $GLOBALS['TYPO3_REQUEST'], - $message, - ['code' => PageAccessFailureReasons::DATABASE_CONNECTION_FAILED] - ); - throw new ImmediateResponseException($response, 1533931298); - } catch (ServiceUnavailableException $e) { - throw new ServiceUnavailableException($message, 1301648782); - } - } - // Call post processing function for DB connection - if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB'])) { - trigger_error('The "connectToDB" hook will be removed in TYPO3 v10.0 in favor of PSR-15. Use a middleware instead.', E_USER_DEPRECATED); - $_params = ['pObj' => &$this]; - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['connectToDB'] as $_funcRef) { - GeneralUtility::callUserFunction($_funcRef, $_params, $this); - } - } - } - /******************************************** * * Initializing, resolving page id @@ -975,46 +724,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface $this->pageCache = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_pages'); } - /** - * Initializes the front-end login user. - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. Use the PSR-15 middleware instead to set up the Frontend User object. - */ - public function initFEuser() - { - trigger_error('$TSFE->initFEuser() will be removed in TYPO3 v10.0. Use the FrontendUserAuthenticator middleware instead to initialize a Frontend User object.', E_USER_DEPRECATED); - $this->fe_user = GeneralUtility::makeInstance(FrontendUserAuthentication::class); - // List of pid's acceptable - $pid = GeneralUtility::_GP('pid'); - $this->fe_user->checkPid_value = $pid ? implode(',', GeneralUtility::intExplode(',', $pid)) : 0; - // Check if a session is transferred: - if (GeneralUtility::_GP('FE_SESSION_KEY')) { - $fe_sParts = explode('-', GeneralUtility::_GP('FE_SESSION_KEY')); - // If the session key hash check is OK: - if (md5($fe_sParts[0] . '/' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']) === (string)$fe_sParts[1]) { - $cookieName = FrontendUserAuthentication::getCookieName(); - $_COOKIE[$cookieName] = $fe_sParts[0]; - if (isset($_SERVER['HTTP_COOKIE'])) { - // See http://forge.typo3.org/issues/27740 - $_SERVER['HTTP_COOKIE'] .= ';' . $cookieName . '=' . $fe_sParts[0]; - } - $this->fe_user->forceSetCookie = true; - $this->fe_user->dontSetCookie = false; - unset($cookieName); - } - } - $this->fe_user->start(); - $this->fe_user->unpack_uc(); - - // Call hook for possible manipulation of frontend user object - if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser'])) { - trigger_error('The "initFEuser" hook will be removed in TYPO3 v10.0 in favor of PSR-15. Use a middleware instead.', E_USER_DEPRECATED); - $_params = ['pObj' => &$this]; - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser'] as $_funcRef) { - GeneralUtility::callUserFunction($_funcRef, $_params, $this); - } - } - } - /** * Initializes the front-end user groups. * Sets frontend.user aspect based on front-end user status. @@ -1074,26 +783,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface return $userAspect->isUserOrGroupSet(); } - /** - * Provides ways to bypass the '?id=[xxx]&type=[xx]' format, using either PATH_INFO or virtual HTML-documents (using Apache mod_rewrite) - * - * Two options: - * 1) Use PATH_INFO (also Apache) to extract id and type from that var. Does not require any special modules compiled with apache. (less typical) - * 2) Using hook which enables features like those provided from "realurl" extension (AKA "Speaking URLs") - * - * @deprecated since TYPO3 v9.3, will be removed in TYPO3 v10.0. - */ - public function checkAlternativeIdMethods() - { - trigger_error('$TSFE->checkAlternativeIdMethods() will removed in TYPO3 v10.0, extensions should use a Frontend PSR-15-based middleware to hook into the frontend process. There is no need to call this method directly.', E_USER_DEPRECATED); - $this->siteScript = GeneralUtility::getIndpEnv('TYPO3_SITE_SCRIPT'); - // Call post processing function for custom URL methods. - $_params = ['pObj' => &$this]; - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkAlternativeIdMethods-PostProc'] ?? [] as $_funcRef) { - GeneralUtility::callUserFunction($_funcRef, $_params, $this); - } - } - /** * Clears the preview-flags, sets sim_exec_time to current time. * Hidden pages must be hidden as default, $GLOBALS['SIM_EXEC_TIME'] is set to $GLOBALS['EXEC_TIME'] @@ -1124,64 +813,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface return (bool)$this->context->getPropertyFromAspect('backend.user', 'isLoggedIn', false); } - /** - * Creates the backend user object and returns it. - * - * @return FrontendBackendUserAuthentication the backend user object - * @deprecated since TYPO3 v9.3, will be removed in TYPO3 v10.0. - */ - public function initializeBackendUser() - { - trigger_error('$TSFE->initializeBackendUser() will be removed in TYPO3 v10.0. Extensions should ensure that the BackendAuthenticator middleware is run to load a backend user.', E_USER_DEPRECATED); - // PRE BE_USER HOOK - if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preBeUser'])) { - trigger_error('The "preBeUser" hook will be removed in TYPO3 v10.0 in favor of PSR-15. Use a middleware instead.', E_USER_DEPRECATED); - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preBeUser'] as $_funcRef) { - $_params = []; - GeneralUtility::callUserFunction($_funcRef, $_params, $this); - } - } - $backendUserObject = null; - // If the backend cookie is set, - // we proceed and check if a backend user is logged in. - if ($_COOKIE[BackendUserAuthentication::getCookieName()]) { - $GLOBALS['TYPO3_MISC']['microtime_BE_USER_start'] = microtime(true); - $this->getTimeTracker()->push('Back End user initialized'); - $this->beUserLogin = false; - // New backend user object - $backendUserObject = GeneralUtility::makeInstance(FrontendBackendUserAuthentication::class); - $backendUserObject->start(); - $backendUserObject->unpack_uc(); - if (!empty($backendUserObject->user['uid'])) { - $backendUserObject->fetchGroupData(); - } - // Unset the user initialization if any setting / restriction applies - if (!$backendUserObject->checkBackendAccessSettingsFromInitPhp() || empty($backendUserObject->user['uid'])) { - $backendUserObject = null; - } - $this->getTimeTracker()->pull(); - $GLOBALS['TYPO3_MISC']['microtime_BE_USER_end'] = microtime(true); - } - $this->context->setAspect('backend.user', GeneralUtility::makeInstance(UserAspect::class, $backendUserObject)); - $this->context->setAspect('workspace', GeneralUtility::makeInstance(WorkspaceAspect::class, $backendUserObject ? $backendUserObject->workspace : 0)); - // POST BE_USER HOOK - if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['postBeUser'])) { - trigger_error('The "postBeUser" hook will be removed in TYPO3 v10.0 in favor of PSR-15. Use a middleware instead.', E_USER_DEPRECATED); - if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['postBeUser'])) { - $_params = [ - 'BE_USER' => &$backendUserObject - ]; - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['postBeUser'] as $_funcRef) { - GeneralUtility::callUserFunction($_funcRef, $_params, $this); - } - // Set the aspect again, in case it got changed - $this->context->setAspect('backend.user', GeneralUtility::makeInstance(UserAspect::class, $backendUserObject)); - $this->context->setAspect('workspace', GeneralUtility::makeInstance(WorkspaceAspect::class, $backendUserObject ? $backendUserObject->workspace : 0)); - } - } - return $backendUserObject; - } - /** * Determines the id and evaluates any preview settings * Basically this function is about determining whether a backend user is logged in, @@ -1690,28 +1321,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface } } - /** - * Get page shortcut; Finds the records pointed to by input value $SC (the shortcut value). - * - * @param int $SC The value of the "shortcut" field from the pages record - * @param int $mode The shortcut mode: 1 will select first subpage, 2 a random subpage, 3 the parent page; default is the page pointed to by $SC - * @param int $thisUid The current page UID of the page which is a shortcut - * @param int $itera Safety feature which makes sure that the function is calling itself recursively max 20 times (since this function can find shortcuts to other shortcuts to other shortcuts...) - * @param array $pageLog An array filled with previous page uids tested by the function - new page uids are evaluated against this to avoid going in circles. - * @param bool $disableGroupCheck If true, the group check is disabled when fetching the target page (needed e.g. for menu generation) - * @throws \RuntimeException - * @throws ShortcutTargetPageNotFoundException - * @return mixed Returns the page record of the page that the shortcut pointed to. - * @internal - * @see getPageAndRootline() - * @deprecated As this method conceptually belongs to PageRepository, it is moved in PageRepository, and will be removed in TYPO3 v10.0. - */ - public function getPageShortcut($SC, $mode, $thisUid, $itera = 20, $pageLog = [], $disableGroupCheck = false) - { - trigger_error('$TSFE->getPageShortcut() has been moved to PageRepository, use the PageRepository directly to call this functionality, as this method will be removed in TYPO3 v10.0.', E_USER_DEPRECATED); - return $this->sys_page->getPageShortcut($SC, $mode, $thisUid, $itera, $pageLog, $disableGroupCheck); - } - /** * Checks if visibility of the page is blocked upwards in the root line. * @@ -1950,235 +1559,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface } } - /** - * Page unavailable handler for use in frontend plugins from extensions. - * - * @param string $reason Reason text - * @param string $header HTTP header to send - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. - */ - public function pageUnavailableAndExit($reason = '', $header = '') - { - trigger_error('$TSFE->pageUnavailableAndExit() will be removed in TYPO3 v10.0. Use TYPO3\'s ErrorController with Request/Response objects instead.', E_USER_DEPRECATED); - $header = $header ?: $GLOBALS['TYPO3_CONF_VARS']['FE']['pageUnavailable_handling_statheader']; - $this->pageUnavailableHandler($GLOBALS['TYPO3_CONF_VARS']['FE']['pageUnavailable_handling'], $header, $reason); - die; - } - - /** - * Page-not-found handler for use in frontend plugins from extensions. - * - * @param string $reason Reason text - * @param string $header HTTP header to send - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. - */ - public function pageNotFoundAndExit($reason = '', $header = '') - { - trigger_error('$TSFE->pageNotFoundAndExit() will be removed in TYPO3 v10.0. Use TYPO3\'s ErrorController with Request/Response objects instead.', E_USER_DEPRECATED); - $header = $header ?: $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling_statheader']; - $this->pageNotFoundHandler($GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFound_handling'], $header, $reason); - die; - } - - /** - * Checks whether the pageUnavailableHandler should be used. To be used, pageUnavailable_handling must be set - * and devIPMask must not match the current visitor's IP address. - * - * @return bool TRUE/FALSE whether the pageUnavailable_handler should be used. - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. - */ - public function checkPageUnavailableHandler() - { - trigger_error('$TSFE->checkPageUnavailableHandler() will be removed in TYPO3 v10.0. Use TYPO3\'s ErrorController with Request/Response objects instead.', E_USER_DEPRECATED); - if ( - $GLOBALS['TYPO3_CONF_VARS']['FE']['pageUnavailable_handling'] - && !GeneralUtility::cmpIP( - GeneralUtility::getIndpEnv('REMOTE_ADDR'), - $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'] - ) - ) { - $checkPageUnavailableHandler = true; - } else { - $checkPageUnavailableHandler = false; - } - return $checkPageUnavailableHandler; - } - - /** - * Page unavailable handler. Acts a wrapper for the pageErrorHandler method. - * - * @param mixed $code See ['FE']['pageUnavailable_handling'] for possible values - * @param string $header If set, this is passed directly to the PHP function, header() - * @param string $reason If set, error messages will also mention this as the reason for the page-not-found. - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. - */ - public function pageUnavailableHandler($code, $header, $reason) - { - trigger_error('$TSFE->pageUnavailableHandler() will be removed in TYPO3 v10.0. Use TYPO3\'s ErrorController with Request/Response objects instead.', E_USER_DEPRECATED); - $this->pageErrorHandler($code, $header, $reason); - } - - /** - * Page not found handler. Acts a wrapper for the pageErrorHandler method. - * - * @param mixed $code See docs of ['FE']['pageNotFound_handling'] for possible values - * @param string $header If set, this is passed directly to the PHP function, header() - * @param string $reason If set, error messages will also mention this as the reason for the page-not-found. - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. - */ - public function pageNotFoundHandler($code, $header = '', $reason = '') - { - trigger_error('$TSFE->pageNotFoundHandler() will be removed in TYPO3 v10.0. Use TYPO3\'s ErrorController with Request/Response objects instead.', E_USER_DEPRECATED); - $this->pageErrorHandler($code, $header, $reason); - } - - /** - * Generic error page handler. - * Exits. - * - * @param mixed $code See docs of ['FE']['pageNotFound_handling'] and ['FE']['pageUnavailable_handling'] for all possible values - * @param string $header If set, this is passed directly to the PHP function, header() - * @param string $reason If set, error messages will also mention this as the reason for the page-not-found. - * @throws \RuntimeException - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. - */ - public function pageErrorHandler($code, $header = '', $reason = '') - { - trigger_error('$TSFE->pageErrorHandler() will be removed in TYPO3 v10.0. Use TYPO3\'s ErrorController with Request/Response objects instead.', E_USER_DEPRECATED); - // Issue header in any case: - if ($header) { - $headerArr = preg_split('/\\r|\\n/', $header, -1, PREG_SPLIT_NO_EMPTY); - foreach ($headerArr as $header) { - header($header); - } - } - // Create response: - // Simply boolean; Just shows TYPO3 error page with reason: - if (strtolower($code) === 'true' || (string)$code === '1' || is_bool($code)) { - echo GeneralUtility::makeInstance(ErrorPageController::class)->errorAction( - 'Page Not Found', - 'The page did not exist or was inaccessible.' . ($reason ? ' Reason: ' . $reason : '') - ); - } elseif (GeneralUtility::isFirstPartOfStr($code, 'USER_FUNCTION:')) { - $funcRef = trim(substr($code, 14)); - $params = [ - 'currentUrl' => GeneralUtility::getIndpEnv('REQUEST_URI'), - 'reasonText' => $reason, - 'pageAccessFailureReasons' => $this->getPageAccessFailureReasons() - ]; - try { - echo GeneralUtility::callUserFunction($funcRef, $params, $this); - } catch (\Exception $e) { - throw new \RuntimeException('Error: 404 page by USER_FUNCTION "' . $funcRef . '" failed.', 1509296032, $e); - } - } elseif (GeneralUtility::isFirstPartOfStr($code, 'READFILE:')) { - $readFile = GeneralUtility::getFileAbsFileName(trim(substr($code, 9))); - if (@is_file($readFile)) { - echo str_replace( - [ - '###CURRENT_URL###', - '###REASON###' - ], - [ - GeneralUtility::getIndpEnv('REQUEST_URI'), - htmlspecialchars($reason) - ], - file_get_contents($readFile) - ); - } else { - throw new \RuntimeException('Configuration Error: 404 page "' . $readFile . '" could not be found.', 1294587214); - } - } elseif (GeneralUtility::isFirstPartOfStr($code, 'REDIRECT:')) { - HttpUtility::redirect(substr($code, 9)); - } elseif ($code !== '') { - // Check if URL is relative - $url_parts = parse_url($code); - // parse_url could return an array without the key "host", the empty check works better than strict check - if (empty($url_parts['host'])) { - $url_parts['host'] = GeneralUtility::getIndpEnv('HTTP_HOST'); - if ($code[0] === '/') { - $code = GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST') . $code; - } else { - $code = GeneralUtility::getIndpEnv('TYPO3_REQUEST_DIR') . $code; - } - $checkBaseTag = false; - } else { - $checkBaseTag = true; - } - // Check recursion - if ($code == GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL')) { - if ($reason == '') { - $reason = 'Page cannot be found.'; - } - $reason .= LF . LF . 'Additionally, ' . $code . ' was not found while trying to retrieve the error document.'; - throw new \RuntimeException(nl2br(htmlspecialchars($reason)), 1294587215); - } - // Prepare headers - $headerArr = [ - 'User-agent: ' . GeneralUtility::getIndpEnv('HTTP_USER_AGENT'), - 'Referer: ' . GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL') - ]; - $report = []; - $res = GeneralUtility::getUrl($code, 1, $headerArr, $report); - if ((int)$report['error'] !== 0 && (int)$report['error'] !== 200) { - throw new \RuntimeException('Failed to fetch error page "' . $code . '", reason: ' . $report['message'], 1509296606); - } - // Header and content are separated by an empty line - list($header, $content) = explode(CRLF . CRLF, $res, 2); - $content .= CRLF; - if (false === $res) { - // Last chance -- redirect - HttpUtility::redirect($code); - } else { - // Forward these response headers to the client - $forwardHeaders = [ - 'Content-Type:' - ]; - $headerArr = preg_split('/\\r|\\n/', $header, -1, PREG_SPLIT_NO_EMPTY); - foreach ($headerArr as $header) { - foreach ($forwardHeaders as $h) { - if (preg_match('/^' . $h . '/', $header)) { - header($header); - } - } - } - // Put <base> if necessary - if ($checkBaseTag) { - // If content already has <base> tag, we do not need to do anything - if (false === stristr($content, '<base ')) { - // Generate href for base tag - $base = $url_parts['scheme'] . '://'; - if ($url_parts['user'] != '') { - $base .= $url_parts['user']; - if ($url_parts['pass'] != '') { - $base .= ':' . $url_parts['pass']; - } - $base .= '@'; - } - $base .= $url_parts['host']; - // Add path portion skipping possible file name - $base .= preg_replace('/(.*\\/)[^\\/]*/', '${1}', $url_parts['path']); - // Put it into content (generate also <head> if necessary) - $replacement = LF . '<base href="' . htmlentities($base) . '" />' . LF; - if (stristr($content, '<head>')) { - $content = preg_replace('/(<head>)/i', '\\1' . $replacement, $content); - } else { - $content = preg_replace('/(<html[^>]*>)/i', '\\1<head>' . $replacement . '</head>', $content); - } - } - } - // Output the content - echo $content; - } - } else { - echo GeneralUtility::makeInstance(ErrorPageController::class)->errorAction( - 'Page Not Found', - $reason ? 'Reason: ' . $reason : 'Page cannot be found.' - ); - } - die; - } - /** * Fetches the integer page id for a page alias. * Looks if ->id is not an integer and if so it will search for a page alias and if found the page uid of that page is stored in $this->id @@ -2195,87 +1575,11 @@ class TypoScriptFrontendController implements LoggerAwareInterface } } - /** - * Merging values into the global $_GET - * - * @param array $GET_VARS Array of key/value pairs that will be merged into the current GET-vars. (Non-escaped values) - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. This was mainly used in RealURL to set $id etc. but should be done manually instead. - */ - protected function mergingWithGetVars($GET_VARS) - { - if (is_array($GET_VARS)) { - // Getting $_GET var, unescaped. - $realGet = GeneralUtility::_GET(); - if (!is_array($realGet)) { - $realGet = []; - } - // Merge new values on top: - ArrayUtility::mergeRecursiveWithOverrule($realGet, $GET_VARS); - // Write values back to $_GET - $_GET = $realGet; - $GLOBALS['HTTP_GET_VARS'] = $realGet; - // Setting these specifically (like in the init-function): - if (isset($GET_VARS['type'])) { - $this->type = (int)$GET_VARS['type']; - } - if (isset($GET_VARS['cHash'])) { - $this->cHash = $GET_VARS['cHash']; - } - if (isset($GET_VARS['MP'])) { - $this->MP = $GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids'] ? $GET_VARS['MP'] : ''; - } - if (isset($GET_VARS['no_cache']) && $GET_VARS['no_cache']) { - $this->set_no_cache('no_cache is requested via GET parameter'); - } - } - } - /******************************************** * * Template and caching related functions. * *******************************************/ - /** - * Calculates a hash string based on additional parameters in the url. - * - * Calculated hash is stored in $this->cHash_array. - * This is used to cache pages with more parameters than just id and type. - * - * @see reqCHash() - * @deprecated since TYPO3 v9.5, will be removed in TYPO3 v10.0. This validation is done in the PageParameterValidator PSR-15 middleware. - */ - public function makeCacheHash() - { - trigger_error('$TSFE->makeCacheHash() will be removed in TYPO3 v10.0, as this is now handled in the PSR-15 middleware.', E_USER_DEPRECATED); - // No need to test anything if caching was already disabled. - if ($this->no_cache && !$GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError']) { - return; - } - $GET = GeneralUtility::_GET(); - if ($this->cHash && is_array($GET)) { - // Make sure we use the page uid and not the page alias - $GET['id'] = $this->id; - $this->cHash_array = $this->cacheHash->getRelevantParameters(HttpUtility::buildQueryString($GET)); - $cHash_calc = $this->cacheHash->calculateCacheHash($this->cHash_array); - if (!hash_equals($cHash_calc, $this->cHash)) { - if ($GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError']) { - $response = GeneralUtility::makeInstance(ErrorController::class)->pageNotFoundAction( - $GLOBALS['TYPO3_REQUEST'], - 'Request parameters could not be validated (&cHash comparison failed)', - ['code' => PageAccessFailureReasons::CACHEHASH_COMPARISON_FAILED] - ); - throw new ImmediateResponseException($response, 1533931352); - } - $this->disableCache(); - $this->getTimeTracker()->setTSlogMessage('The incoming cHash "' . $this->cHash . '" and calculated cHash "' . $cHash_calc . '" did not match, so caching was disabled. The fieldlist used was "' . implode(',', array_keys($this->cHash_array)) . '"', 2); - } - } elseif (is_array($GET)) { - // No cHash is set, check if that is correct - if ($this->cacheHash->doParametersRequireCacheHash(HttpUtility::buildQueryString($GET))) { - $this->reqCHash(); - } - } - } /** * Will disable caching if the cHash value was not set when having dynamic arguments in GET query parameters. @@ -2313,16 +1617,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface $this->pageArguments = $pageArguments; } - /** - * Initialize the TypoScript template parser - * @deprecated since TYPO3 v9.4 will be removed in TYPO3 v10.0. Either instantiate $TSFE->tmpl yourself, if really necessary. - */ - public function initTemplate() - { - trigger_error('$TSFE->initTemplate() will be removed in TYPO3 v10.0. Instantiating TemplateService is done implicitly on usage within $TSFE directly.', E_USER_DEPRECATED); - $this->tmpl = GeneralUtility::makeInstance(TemplateService::class, $this->context); - } - /** * See if page is in cache and get it if so * Stores the page content in $this->content if something is found. @@ -2425,7 +1719,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface // Restore page title information, this is needed to generate the page title for // partially cached pages. $this->page['title'] = $row['pageTitleInfo']['title']; - $this->altPageTitle = $row['pageTitleInfo']['altPageTitle']; $this->indexedDocTitle = $row['pageTitleInfo']['indexedDocTitle']; if (isset($this->config['config']['debug'])) { @@ -2609,10 +1902,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface if (is_array($this->pSetup['config.'])) { ArrayUtility::mergeRecursiveWithOverrule($this->config['config'], $this->pSetup['config.']); } - // @deprecated since TYPO3 v9, can be removed in TYPO3 v10.0 - if ($this->config['config']['typolinkCheckRootline']) { - $this->logDeprecatedTyposcript('config.typolinkCheckRootline', 'The functionality is always enabled since TYPO3 v9 and can be removed from your TypoScript code'); - } // Set default values for removeDefaultJS and inlineStyle2TempFile so CSS and JS are externalized if compatversion is higher than 4.0 if (!isset($this->config['config']['removeDefaultJS'])) { $this->config['config']['removeDefaultJS'] = 'external'; @@ -2709,7 +1998,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface } else { $languageKey = $this->config['config']['language'] ?? 'default'; } - $this->lang = $languageKey; $this->setOutputLanguage($languageKey); // Rendering charset of HTML page. @@ -2926,89 +2214,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface } } - /** - * Handle data submission - * This is done at this point, because we need the config values - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. - */ - public function handleDataSubmission() - { - trigger_error('$TSFE->handleDataSubmission() will be removed in TYPO3 v10.0. Use a PSR-15 middleware. The hooks are still executed as PSR-15 middleware but will be removed in TYPO3 v10.0.', E_USER_DEPRECATED); - // Hook for processing data submission to extensions - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission'] ?? [] as $className) { - $_procObj = GeneralUtility::makeInstance($className); - $_procObj->checkDataSubmission($this); - } - } - - /** - * Loops over all configured URL handlers and registers all active handlers in the redirect URL handler array. - * - * @param bool $calledFromCore if set to true, no deprecation warning will be triggered - * @see $activeRedirectUrlHandlers - * @deprecated since TYPO3 v9.3, will be removed in TYPO3 v10.0. Do not call this method anymore, and also ensure that all urlHandlers are migrated to PSR-15 middlewares. - */ - public function initializeRedirectUrlHandlers($calledFromCore = false) - { - $urlHandlers = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['urlProcessing']['urlHandlers'] ?? false; - if (!$urlHandlers) { - if (!$calledFromCore) { - trigger_error('$TSFE->initializeRedirectUrlHandlers() will be removed in TYPO3 v10.0. Do not call this method anymore and implement UrlHandlers by PSR-15 middlewares instead.', E_USER_DEPRECATED); - } - return; - } - trigger_error('The system has registered RedirectUrlHandlers via $TYPO3_CONF_VARS[SC_OPTIONS][urlProcessing][urlHandlers]. This functionality will be removed in TYPO3 v10.0. Ensure that extensions using this functionality switch to PSR-15 middlewares instead.', E_USER_DEPRECATED); - - foreach ($urlHandlers as $identifier => $configuration) { - if (empty($configuration) || !is_array($configuration)) { - throw new \RuntimeException('Missing configuration for URL handler "' . $identifier . '".', 1442052263); - } - if (!is_string($configuration['handler']) || empty($configuration['handler']) || !class_exists($configuration['handler']) || !is_subclass_of($configuration['handler'], UrlHandlerInterface::class)) { - throw new \RuntimeException('The URL handler "' . $identifier . '" defines an invalid provider. Ensure the class exists and implements the "' . UrlHandlerInterface::class . '".', 1442052249); - } - } - - $orderedHandlers = GeneralUtility::makeInstance(DependencyOrderingService::class)->orderByDependencies($urlHandlers); - - foreach ($orderedHandlers as $configuration) { - /** @var UrlHandlerInterface $urlHandler */ - $urlHandler = GeneralUtility::makeInstance($configuration['handler']); - if ($urlHandler->canHandleCurrentUrl()) { - $this->activeUrlHandlers[] = $urlHandler; - } - } - } - - /** - * Loops over all registered URL handlers and lets them process the current URL. - * - * If no handler has stopped the current process (e.g. by redirecting) and a - * the redirectUrl property is not empty, the user will be redirected to this URL. - * - * @internal Should be called by the FrontendRequestHandler only. - * @return ResponseInterface|null - * @param bool $calledFromCore if set to true, no deprecation warning will be triggered - * @deprecated since TYPO3 v9.3, will be removed in TYPO3 v10.0. Do not call this method anymore, and also ensure that all urlHandlers are migrated to PSR-15 middlewares. - */ - public function redirectToExternalUrl($calledFromCore = false) - { - if (!$calledFromCore) { - trigger_error('$TSFE->redirectToExternalUrl() will be removed in TYPO3 v10.0. Do not call this method anymore and implement UrlHandlers by PSR-15 middlewares instead.', E_USER_DEPRECATED); - } - foreach ($this->activeUrlHandlers as $redirectHandler) { - $response = $redirectHandler->handle(); - if ($response instanceof ResponseInterface) { - return $response; - } - } - - if (!empty($this->activeUrlHandlers)) { - throw new \RuntimeException('A URL handler is active but did not process the URL.', 1442305505); - } - - return null; - } - /** * Sets the URL_ID_TOKEN in the internal var, $this->getMethodUrlIdToken * This feature allows sessions to use a GET-parameter instead of a cookie. @@ -3028,12 +2233,8 @@ class TypoScriptFrontendController implements LoggerAwareInterface * * @param array $queryParams $_GET (usually called with a PSR-7 $request->getQueryParams()) */ - public function calculateLinkVars(array $queryParams = null) + public function calculateLinkVars(array $queryParams) { - if ($queryParams === null) { - trigger_error('Calling $TSFE->calculateLinkVars() without first argument will not be supported in TYPO3 v10.0. anymore, and needs to be an array.', E_USER_DEPRECATED); - $queryParams = GeneralUtility::_GET(); - } $this->linkVars = ''; if (empty($this->config['config']['linkVars'])) { return; @@ -3174,21 +2375,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface return null; } - /** - * Redirect to target page if the current page is an overlaid mountpoint. - * - * If the current page is of type mountpoint and should be overlaid with the contents of the mountpoint page - * and is accessed directly, the user will be redirected to the mountpoint context. - * @deprecated in TYPO3 9, will be removed in TYPO3 10 - */ - public function checkPageForMountpointRedirect() - { - trigger_error('$TSFE->checkPageForMountpointRedirect() will be removed in TYPO3 v10.0, as this is now handled within a PSR-15 middleware.', E_USER_DEPRECATED); - if (!empty($this->originalMountPointPage) && $this->originalMountPointPage['doktype'] == PageRepository::DOKTYPE_MOUNTPOINT) { - $this->redirectToCurrentPage(); - } - } - /** * Returns URI of target page, if the current page is a Shortcut. * @@ -3208,37 +2394,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface return null; } - /** - * Redirect to target page, if the current page is a Shortcut. - * - * If the current page is of type shortcut and accessed directly via its URL, this function redirects to the - * Shortcut target using a Location header. - * @deprecated in TYPO3 9, will be removed in TYPO3 10 - */ - public function checkPageForShortcutRedirect() - { - trigger_error('$TSFE->checkPageForShortcutRedirect() will be removed in TYPO3 v10.0, as this is now done within a PSR-15 middleware.', E_USER_DEPRECATED); - if (!empty($this->originalShortcutPage) && (int)$this->originalShortcutPage['doktype'] === PageRepository::DOKTYPE_SHORTCUT) { - $this->redirectToCurrentPage(); - } - } - - /** - * Builds a typolink to the current page, appends the type parameter if required - * and redirects the user to the generated URL using a Location header. - * @deprecated in TYPO3 9, will be removed in TYPO3 10 - */ - protected function redirectToCurrentPage() - { - trigger_error('$TSFE->redirectToCurrentPage() will be removed in TYPO3 v10.0, as this is now done within a PSR-15 middleware.', E_USER_DEPRECATED); - $redirectUrl = $this->getUriToCurrentPageForRedirect($GLOBALS['TYPO3_REQUEST']); - // Prevent redirection loop - if (!empty($redirectUrl) && GeneralUtility::getIndpEnv('REQUEST_URI') !== '/' . $redirectUrl) { - // redirect and exit - HttpUtility::redirect($redirectUrl, HttpUtility::HTTP_STATUS_307); - } - } - /** * Instantiate \TYPO3\CMS\Frontend\ContentObject to generate the correct target URL * @@ -3275,7 +2430,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ public function isGeneratePage() { - return !$this->cacheContentFlag && empty($this->activeUrlHandlers); + return !$this->cacheContentFlag; } /** @@ -3379,19 +2534,11 @@ class TypoScriptFrontendController implements LoggerAwareInterface 'tstamp' => $GLOBALS['EXEC_TIME'], 'pageTitleInfo' => [ 'title' => $this->page['title'], - 'altPageTitle' => $this->altPageTitle, 'indexedDocTitle' => $this->indexedDocTitle ] ]; $this->cacheExpires = $expirationTstamp; $this->pageCacheTags[] = 'pageId_' . $cacheData['page_id']; - if ($this->page_cache_reg1) { - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. Remove this "if" along with property page_cache_reg1 - trigger_error('$TSFE->page_cache_reg1 will be removed in TYPO3 v10.0.', E_USER_DEPRECATED); - $reg1 = (int)$this->page_cache_reg1; - $cacheData['reg1'] = $reg1; - $this->pageCacheTags[] = 'reg1_' . $reg1; - } if (!empty($this->page['cache_tags'])) { $tags = GeneralUtility::trimExplode(',', $this->page['cache_tags'], true); $this->pageCacheTags = array_merge($this->pageCacheTags, $tags); @@ -3511,12 +2658,8 @@ class TypoScriptFrontendController implements LoggerAwareInterface * * @param ServerRequestInterface $request */ - public function preparePageContentGeneration(ServerRequestInterface $request = null) + public function preparePageContentGeneration(ServerRequestInterface $request) { - if ($request === null) { - trigger_error('$TSFE->preparePageContentGeneration() requires a ServerRequestInterface as first argument, add this argument in order to avoid this deprecation error.', E_USER_DEPRECATED); - $request = ServerRequestFactory::fromGlobals(); - } $this->getTimeTracker()->push('Prepare page content generation'); if (isset($this->page['content_from_pid']) && $this->page['content_from_pid'] > 0) { // make REAL copy of TSFE object - not reference! @@ -3528,19 +2671,8 @@ class TypoScriptFrontendController implements LoggerAwareInterface $this->contentPid = (int)$temp_copy_TSFE->id; unset($temp_copy_TSFE); } - if ($this->config['config']['MP_defaults'] ?? false) { - $temp_parts = GeneralUtility::trimExplode('|', $this->config['config']['MP_defaults'], true); - foreach ($temp_parts as $temp_p) { - list($temp_idP, $temp_MPp) = explode(':', $temp_p, 2); - $temp_ids = GeneralUtility::intExplode(',', $temp_idP); - foreach ($temp_ids as $temp_id) { - $this->MP_defaults[$temp_id] = $temp_MPp; - } - } - } // Global vars... $this->indexedDocTitle = $this->page['title'] ?? null; - $this->debug = !empty($this->config['config']['debug']); // Base url: if (isset($this->config['config']['baseURL'])) { $this->baseUrl = $this->config['config']['baseURL']; @@ -3671,7 +2803,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface /** * Generate the page title, can be called multiple times, - * as $this->altPageTitle might have been modified by an uncached plugin etc. + * as PageTitleProvider might have been modified by an uncached plugin etc. * * @return string the generated page title */ @@ -3699,16 +2831,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface (bool)($this->config['config']['pageTitleFirst'] ?? false), $pageTitleSeparator ); - if ($this->config['config']['titleTagFunction'] ?? false) { - // @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0 - $this->logDeprecatedTyposcript('config.titleTagFunction', 'Please use the new TitleTag API to create custom title tags. Deprecated in version 9, will be removed in version 10'); - - $titleTagContent = $this->cObj->callUserFunction( - $this->config['config']['titleTagFunction'], - [], - $titleTagContent - ); - } // stdWrap around the title tag if (isset($this->config['config']['pageTitle.']) && is_array($this->config['config']['pageTitle.'])) { $titleTagContent = $this->cObj->stdWrap($titleTagContent, $this->config['config']['pageTitle.']); @@ -3908,7 +3030,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ public function isINTincScript() { - return is_array($this->config['INTincScript']) && empty($this->activeUrlHandlers); + return is_array($this->config['INTincScript']); } /******************************************** @@ -3925,7 +3047,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface public function isOutputting() { // Initialize by status if there is a Redirect URL - $enableOutput = empty($this->activeUrlHandlers); + $enableOutput = true; // Call hook for possible disabling of output: $_params = ['pObj' => &$this, 'enableOutput' => &$enableOutput]; foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['isOutputting'] ?? [] as $_funcRef) { @@ -3934,66 +3056,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface return $enableOutput; } - /** - * Process the output before it's actually outputted. Sends headers also. - * - * This includes substituting the "username" comment, sending additional headers - * (as defined in the TypoScript "config.additionalHeaders" object), XHTML cleaning content (if configured) - * Works on $this->content. - * - * @deprecated since TYPO3 v9.5, will be removed in TYPO3 v10.0. - */ - public function processOutput() - { - trigger_error('TypoScriptFrontendController->processOutput() will be removed in TYPO3 v10.0. Use streamFile() instead.', E_USER_DEPRECATED); - $this->sendHttpHeadersDirectly(); - $this->processContentForOutput(); - } - - /** - * Runs PHP header() calls. In an ideal world, this should never happen, but we keep it for bw compat. - * - * @internal - */ - public function sendHttpHeadersDirectly() - { - // Set header for charset-encoding unless disabled - if (empty($this->config['config']['disableCharsetHeader'])) { - $headLine = 'Content-Type: ' . $this->contentType . '; charset=' . trim($this->metaCharset); - header($headLine); - } - // Set header for content language unless disabled - if (empty($this->config['config']['disableLanguageHeader']) && !empty($this->sys_language_isocode)) { - $headLine = 'Content-Language: ' . trim($this->sys_language_isocode); - header($headLine); - } - // Set cache related headers to client (used to enable proxy / client caching!) - if (!empty($this->config['config']['sendCacheHeaders'])) { - $headers = $this->getCacheHeaders(); - foreach ($headers as $header => $value) { - header($header . ': ' . $value); - } - } - // Set additional headers if any have been configured via TypoScript - $additionalHeaders = $this->getAdditionalHeaders(); - foreach ($additionalHeaders as $headerConfig) { - header( - $headerConfig['header'], - // "replace existing headers" is turned on by default, unless turned off - $headerConfig['replace'], - $headerConfig['statusCode'] - ); - } - // Send appropriate status code in case of temporary content - if ($this->tempContent) { - header('HTTP/1.0 503 Service unavailable'); - $headers = $this->getHttpHeadersForTemporaryContent(); - foreach ($headers as $header => $value) { - header($header . ': ' . $value); - } - } - } - /** * Process the output before it's actually outputted. * @@ -4060,20 +3122,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface return $response; } - /** - * Send cache headers good for client/reverse proxy caching. - * @see getCacheHeaders() for more details - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. Use $TSFE->processOutput to send headers instead. - */ - public function sendCacheHeaders() - { - trigger_error('$TSFE->sendCacheHeaders() will be removed in TYPO3 v10.0, as all headers are compiled within "processOutput" depending on various scenarios. Use $TSFE->processOutput() instead.', E_USER_DEPRECATED); - $headers = $this->getCacheHeaders(); - foreach ($headers as $header => $value) { - header($header . ': ' . $value); - } - } - /** * Get cache headers good for client/reverse proxy caching. * This function should not be called if the page content is temporary (like for "Page is being generated..." @@ -4137,8 +3185,7 @@ class TypoScriptFrontendController implements LoggerAwareInterface */ public function isStaticCacheble() { - $doCache = !$this->no_cache && !$this->isINTincScript() && !$this->isUserOrGroupSet(); - return $doCache; + return !$this->no_cache && !$this->isINTincScript() && !$this->isUserOrGroupSet(); } /** @@ -4148,19 +3195,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface { $search = []; $replace = []; - // Substitutes username mark with the username - if (!empty($this->fe_user->user['uid'])) { - // User name: - $token = isset($this->config['config']['USERNAME_substToken']) ? trim($this->config['config']['USERNAME_substToken']) : ''; - $search[] = $token ? $token : '<!--###USERNAME###-->'; - $replace[] = htmlspecialchars($this->fe_user->user['username']); - // User uid (if configured): - $token = isset($this->config['config']['USERUID_substToken']) ? trim($this->config['config']['USERUID_substToken']) : ''; - if ($token) { - $search[] = $token; - $replace[] = $this->fe_user->user['uid']; - } - } // Substitutes get_URL_ID in case of GET-fallback if ($this->getMethodUrlIdToken) { $search[] = $this->getMethodUrlIdToken; @@ -4179,56 +3213,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface } } - /** - * Stores session data for the front end user - * - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0, as this is a simple wrapper method. - */ - public function storeSessionData() - { - trigger_error('$TSFE->storeSessionData() will be removed in TYPO3 v10.0. Use the call on the FrontendUserAuthentication object directly instead.', E_USER_DEPRECATED); - $this->fe_user->storeSessionData(); - } - - /** - * Outputs preview info. - * - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. Use "hook_eofe" instead. - */ - public function previewInfo() - { - trigger_error('$TSFE->previewInfo() will be removed in TYPO3 v10.0, as this is now called by the Frontend RequestHandler.', E_USER_DEPRECATED); - } - - /** - * End-Of-Frontend hook - * - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. Functionality still exists. - */ - public function hook_eofe() - { - trigger_error('$TSFE->hook_eofe() will be removed in TYPO3 v10.0. The hook is now executed within Frontend RequestHandler.', E_USER_DEPRECATED); - $_params = ['pObj' => &$this]; - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe'] ?? [] as $_funcRef) { - GeneralUtility::callUserFunction($_funcRef, $_params, $this); - } - } - - /** - * Sends HTTP headers for temporary content. - * These headers prevent search engines from caching temporary content and asks them to revisit this page again. - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. Use $TSFE->processOutput to send headers instead. - */ - public function addTempContentHttpHeaders() - { - trigger_error('$TSFE->addTempContentHttpHeaders() will be removed in TYPO3 v10.0, as all headers are compiled within "processOutput" depending on various scenarios. Use $TSFE->processOutput() instead.', E_USER_DEPRECATED); - header('HTTP/1.0 503 Service unavailable'); - $headers = $this->getHttpHeadersForTemporaryContent(); - foreach ($headers as $header => $value) { - header($header . ': ' . $value); - } - } - /** * Returns HTTP headers for temporary content. * These headers prevent search engines from caching temporary content and asks them to revisit this page again. @@ -4431,56 +3415,19 @@ class TypoScriptFrontendController implements LoggerAwareInterface /** * Sets JavaScript code in the additionalJavaScript array * - * @param string $key is the key in the array, for num-key let the value be empty. Note reserved keys 'openPic' and 'mouseOver' + * @param string $key is the key in the array, for num-key let the value be empty. Note reserved key: 'openPic' * @param string $content is the content if you want any - * @see \TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::writeMenu(), ContentObjectRenderer::imageLinkWrap() + * @see ContentObjectRenderer::imageLinkWrap() */ public function setJS($key, $content = '') { - if ($key) { - switch ($key) { - case 'mouseOver': - trigger_error('$TSFE->setJS("mouseOver") will be removed in TYPO3 v10.0. If necessary, use setJS() with your recommended code.', E_USER_DEPRECATED); - // Rollover functionality will be removed in TYPO3 v10.0 - $this->additionalJavaScript[$key] = ' // JS function for mouse-over - function over(name, imgObj) { // - if (document[name]) {document[name].src = eval(name+"_h.src");} - else if (document.getElementById && document.getElementById(name)) {document.getElementById(name).src = eval(name+"_h.src");} - else if (imgObj) {imgObj.src = eval(name+"_h.src");} - } - // JS function for mouse-out - function out(name, imgObj) { // - if (document[name]) {document[name].src = eval(name+"_n.src");} - else if (document.getElementById && document.getElementById(name)) {document.getElementById(name).src = eval(name+"_n.src");} - else if (imgObj) {imgObj.src = eval(name+"_n.src");} - }'; - break; - case 'openPic': - $this->additionalJavaScript[$key] = ' function openPic(url, winName, winParams) { // - var theWindow = window.open(url, winName, winParams); - if (theWindow) {theWindow.focus();} - }'; - break; - default: - $this->additionalJavaScript[$key] = $content; - } - } - } - - /** - * Sets CSS data in the additionalCSS array - * - * @param string $key Is the key in the array, for num-key let the value be empty - * @param string $content Is the content if you want any - * @see setJS() - * - * @deprecated since TYPO3 v9.3, will be removed in TYPO3 v10.0 - */ - public function setCSS($key, $content) - { - trigger_error('$TSFE->setCSS() will be removed in TYPO3 v10.0, use PageRenderer instead to add CSS.', E_USER_DEPRECATED); - if ($key) { - $this->additionalCSS[$key] = $content; + if ($key === 'openPic') { + $this->additionalJavaScript[$key] = ' function openPic(url, winName, winParams) { + var theWindow = window.open(url, winName, winParams); + if (theWindow) {theWindow.focus();} + }'; + } elseif ($key) { + $this->additionalJavaScript[$key] = $content; } } @@ -4599,29 +3546,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface return $cachedCacheLifetime; } - /** - * Returns a unique id to be used as a XML ID (in HTML / XHTML mode) - * - * @param string $desired The desired id. If already used it is suffixed with a number - * @return string The unique id - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0 - as this functionality is not needed anymore and does not belong in this Class conceptually. - */ - public function getUniqueId($desired = '') - { - trigger_error('$TSFE->getUniqueId() will be removed in TYPO3 v10.0, implement this functionality on your own with a proper Singleton Pattern which can be used outside of the frontend scope as well, if needed.', E_USER_DEPRECATED); - if ($desired === '') { - // id has to start with a letter to reach XHTML compliance - $uniqueId = 'a' . $this->uniqueHash(); - } else { - $uniqueId = $desired; - for ($i = 1; isset($this->usedUniqueIds[$uniqueId]); $i++) { - $uniqueId = $desired . '_' . $i; - } - } - $this->usedUniqueIds[$uniqueId] = true; - return $uniqueId; - } - /********************************************* * * Localization and character set conversion @@ -4638,57 +3562,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface return $this->languageService->sL($input); } - /** - * Read locallang files - for frontend applications - * - * @param string $fileRef Reference to a relative filename to include. - * @return array Returns the $LOCAL_LANG array found in the file. If no array found, returns empty array. - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0 - */ - public function readLLfile($fileRef) - { - trigger_error('$TSFE->readLLfile() will be removed in TYPO3 v10.0. The method LanguageService->includeLLFile() can be used directly.', E_USER_DEPRECATED); - return $this->languageService->includeLLFile($fileRef, false, true); - } - - /** - * Returns 'locallang' label - may need initializing by initLLvars - * - * @param string $index Local_lang key for which to return label (language is determined by $this->lang) - * @param array $LOCAL_LANG The locallang array in which to search - * @return string|false Label value of $index key. - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0, use LanguageService->getLLL() directly - */ - public function getLLL($index, $LOCAL_LANG) - { - trigger_error('$TSFE->getLLL() will be removed in TYPO3 v10.0. The method LanguageService->getLLL() can be used directly.', E_USER_DEPRECATED); - if (isset($LOCAL_LANG[$this->lang][$index][0]['target'])) { - return $LOCAL_LANG[$this->lang][$index][0]['target']; - } - if (isset($LOCAL_LANG['default'][$index][0]['target'])) { - return $LOCAL_LANG['default'][$index][0]['target']; - } - return false; - } - - /** - * Initializing the getLL variables needed. - * - * @see settingLanguage() - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. - */ - public function initLLvars() - { - trigger_error('$TSFE->initLLvars() will be removed in TYPO3 v10.0, the initialization can be altered via hooks within settingLanguage().', E_USER_DEPRECATED); - $this->lang = $this->config['config']['language'] ?: 'default'; - $this->setOutputLanguage($this->lang); - - // Rendering charset of HTML page. - if ($this->config['config']['metaCharset']) { - $this->metaCharset = trim(strtolower($this->config['config']['metaCharset'])); - } - } - /** * Sets all internal measures what language the page should be rendered. * This is not for records, but rather the HTML / charset and the locallang labels @@ -4725,37 +3598,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface return $content; } - /** - * Converts the $_POST array from metaCharset (page HTML charset from input form) to utf-8 (internal processing) IF the two charsets are different. - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. - */ - public function convPOSTCharset() - { - trigger_error('$TSFE->convPOSTCharset() will be removed in TYPO3 v10.0. A PSR-15 middleware is now taking care of the conversion. It seems you called this method from your own bootstrap code - ensure that the PrepareTypoScriptFrontendRendering middleware is called and you can remove the method call.', E_USER_DEPRECATED); - if ($this->metaCharset !== 'utf-8' && is_array($_POST) && !empty($_POST)) { - $this->convertCharsetRecursivelyToUtf8($_POST, $this->metaCharset); - $GLOBALS['HTTP_POST_VARS'] = $_POST; - } - } - - /** - * Small helper function to convert charsets for arrays to UTF-8 - * - * @param mixed $data given by reference (string/array usually) - * @param string $fromCharset convert FROM this charset - * @deprecated since TYPO3 v9, will be removed when convPOSTCharset() is removed as well in TYPO3 v10.0. - */ - protected function convertCharsetRecursivelyToUtf8(&$data, string $fromCharset) - { - foreach ($data as $key => $value) { - if (is_array($data[$key])) { - $this->convertCharsetRecursivelyToUtf8($data[$key], $fromCharset); - } elseif (is_string($data[$key])) { - $data[$key] = mb_convert_encoding($data[$key], 'utf-8', $fromCharset); - } - } - } - /** * Calculates page cache timeout according to the records with starttime/endtime on the page. * @@ -4884,51 +3726,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface return $result; } - /** - * Whether the given domain name (potentially including a path segment) matches currently requested host or - * the host including the path segment - * - * @param string $domainName - * @return bool - * @deprecated will be removed in TYPO3 v10.0. - */ - public function domainNameMatchesCurrentRequest($domainName) - { - trigger_error('$TSFE->domainNameMatchesCurrentRequest() will be removed in TYPO3 v10.0, use LegacyDomainResolver instead.', E_USER_DEPRECATED); - $currentDomain = GeneralUtility::getIndpEnv('HTTP_HOST'); - $currentPathSegment = trim(preg_replace('|/[^/]*$|', '', GeneralUtility::getIndpEnv('SCRIPT_NAME'))); - return $currentDomain === $domainName || $currentDomain . $currentPathSegment === $domainName; - } - - /** - * Obtains domain data for the target pid. Domain data is an array with - * 'pid' and 'domainName' members (see sys_domain table for meaning of these fields). - * - * @param int $targetPid Target page id - * @return mixed Return domain data or NULL - * @deprecated will be removed in TYPO3 v10.0. - */ - public function getDomainDataForPid($targetPid) - { - trigger_error('$TSFE->getDomainDataForPid() will be removed in TYPO3 v10.0, use LegacyDomainResolver instead.', E_USER_DEPRECATED); - return GeneralUtility::makeInstance(LegacyDomainResolver::class)->matchPageId((int)$targetPid, $GLOBALS['TYPO3_REQUEST']); - } - - /** - * Obtains the domain name for the target pid. If there are several domains, - * the first is returned. - * - * @param int $targetPid Target page id - * @return mixed Return domain name or NULL if not found - * @deprecated will be removed in TYPO3 v10.0. - */ - public function getDomainNameForPid($targetPid) - { - trigger_error('$TSFE->getDomainNameForPid() will be removed in TYPO3 v10.0, use LegacyDomainResolver instead.', E_USER_DEPRECATED); - $domainData = GeneralUtility::makeInstance(LegacyDomainResolver::class)->matchPageId((int)$targetPid, $GLOBALS['TYPO3_REQUEST']); - return $domainData ? $domainData['domainName'] : null; - } - /** * Fetches the originally requested id, fallsback to $this->id * @@ -5012,8 +3809,6 @@ class TypoScriptFrontendController implements LoggerAwareInterface /** * Send additional headers from config.additionalHeaders - * - * @see processOutput() */ protected function getAdditionalHeaders(): array { @@ -5072,380 +3867,4 @@ class TypoScriptFrontendController implements LoggerAwareInterface } return null; } - - /** - * Deprecation messages for TYPO3 v9 - public properties of TSFE which have been moved as - */ - - /** - * Checks if the property of the given name is set. - * - * Unmarked protected properties must return false as usual. - * Marked properties are evaluated by isset(). - * - * This method is not called for public properties. - * - * @param string $propertyName - * @return bool - */ - public function __isset(string $propertyName) - { - switch ($propertyName) { - case 'sys_language_uid': - trigger_error('Property $TSFE->sys_language_uid is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - return isset($this->$propertyName); - case 'sys_language_content': - trigger_error('Property $TSFE->sys_language_content is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - return isset($this->$propertyName); - case 'sys_language_contentOL': - trigger_error('Property $TSFE->sys_language_contentOL is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - return isset($this->$propertyName); - case 'sys_language_mode': - trigger_error('Property $TSFE->sys_language_mode is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - return isset($this->$propertyName); - case 'loginUser': - trigger_error('Property $TSFE->loginUser is not in use anymore as this information is now stored within the frontend.user aspect.', E_USER_DEPRECATED); - return isset($this->$propertyName); - case 'gr_list': - trigger_error('Property $TSFE->gr_list is not in use anymore as this information is now stored within the frontend.user aspect.', E_USER_DEPRECATED); - return isset($this->$propertyName); - case 'beUserLogin': - trigger_error('Property $TSFE->beUserLogin is not in use anymore as this information is now stored within the backend.user aspect.', E_USER_DEPRECATED); - return isset($this->$propertyName); - case 'showHiddenPage': - trigger_error('Property $TSFE->showHiddenPage is not in use anymore as this information is now stored within the visibility aspect.', E_USER_DEPRECATED); - return isset($this->$propertyName); - case 'showHiddenRecords': - trigger_error('Property $TSFE->showHiddenRecords is not in use anymore as this information is now stored within the visibility aspect.', E_USER_DEPRECATED); - return isset($this->$propertyName); - case 'ADMCMD_preview_BEUSER_uid': - trigger_error('Property $TSFE->ADMCMD_preview_BEUSER_uid is not in use anymore as this information is now stored within the backend.user aspect.', E_USER_DEPRECATED); - return isset($this->$propertyName); - case 'workspacePreview': - trigger_error('Property $TSFE->workspacePreview is not in use anymore as this information is now stored within the workspace aspect.', E_USER_DEPRECATED); - return isset($this->$propertyName); - case 'loginAllowedInBranch': - trigger_error('Property $TSFE->loginAllowedInBranch is marked as protected now as it only contains internal state. Use checkIfLoginAllowedInBranch() instead.', E_USER_DEPRECATED); - return isset($this->$propertyName); - // Regular deprecations / property visibility changes - case 'loginAllowedInBranch_mode': - case 'cacheTimeOutDefault': - case 'cacheContentFlag': - case 'cacheExpires': - case 'isClientCachable': - case 'no_cacheBeforePageGen': - case 'tempContent': - case 'pagesTSconfig': - case 'pageCacheTags': - case 'uniqueCounter': - case 'uniqueString': - case 'lang': - case 'MP_defaults': - case 'debug': - case 'pageAccessFailureHistory': - trigger_error('Property $TSFE->' . $propertyName . ' is marked as protected now as it only contains internal state.', E_USER_DEPRECATED); - return isset($this->$propertyName); - } - return false; - } - - /** - * Gets the value of the property of the given name if tagged. - * - * The evaluation is done in the assumption that this method is never - * reached for a public property. - * - * @param string $propertyName - * @return mixed - */ - public function __get(string $propertyName) - { - switch ($propertyName) { - case 'sys_language_uid': - trigger_error('Property $TSFE->sys_language_uid is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - return $this->context->getPropertyFromAspect('language', 'id', 0); - case 'sys_language_content': - trigger_error('Property $TSFE->sys_language_content is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - return $this->context->getPropertyFromAspect('language', 'contentId', 0); - case 'sys_language_contentOL': - trigger_error('Property $TSFE->sys_language_contentOL is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - return $this->context->getPropertyFromAspect('language', 'legacyOverlayType', '0'); - case 'sys_language_mode': - trigger_error('Property $TSFE->sys_language_mode is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - return $this->context->getPropertyFromAspect('language', 'legacyLanguageMode', ''); - case 'loginUser': - trigger_error('Property $TSFE->loginUser is not in use anymore as this information is now stored within the frontend.user aspect.', E_USER_DEPRECATED); - return $this->context->getPropertyFromAspect('frontend.user', 'isLoggedIn', false); - case 'gr_list': - trigger_error('Property $TSFE->gr_list is not in use anymore as this information is now stored within the frontend.user aspect.', E_USER_DEPRECATED); - return implode(',', $this->context->getPropertyFromAspect('frontend.user', 'groupIds', [0, -1])); - case 'beUserLogin': - trigger_error('Property $TSFE->beUserLogin is not in use anymore as this information is now stored within the backend.user aspect.', E_USER_DEPRECATED); - return $this->context->getPropertyFromAspect('backend.user', 'isLoggedIn', false); - case 'showHiddenPage': - trigger_error('Property $TSFE->showHiddenPage is not in use anymore as this information is now stored within the visibility aspect.', E_USER_DEPRECATED); - return $this->context->getPropertyFromAspect('visibility', 'includeHiddenPages', false); - case 'showHiddenRecords': - trigger_error('Property $TSFE->showHiddenRecords is not in use anymore as this information is now stored within the visibility aspect.', E_USER_DEPRECATED); - return $this->context->getPropertyFromAspect('visibility', 'includeHiddenContent', false); - case 'ADMCMD_preview_BEUSER_uid': - trigger_error('Property $TSFE->ADMCMD_preview_BEUSER_uid is not in use anymore as this information is now stored within the backend.user aspect.', E_USER_DEPRECATED); - return $this->context->getPropertyFromAspect('backend.user', 'id', 0); - case 'workspacePreview': - trigger_error('Property $TSFE->workspacePreview is not in use anymore as this information is now stored within the workspace aspect.', E_USER_DEPRECATED); - return $this->context->getPropertyFromAspect('workspace', 'id', 0); - case 'loginAllowedInBranch': - trigger_error('Property $TSFE->loginAllowedInBranch is marked as protected now as it only contains internal state. Use checkIfLoginAllowedInBranch() instead.', E_USER_DEPRECATED); - break; - // Regular deprecations / property visibility changes - case 'loginAllowedInBranch_mode': - case 'cacheTimeOutDefault': - case 'cacheContentFlag': - case 'cacheExpires': - case 'isClientCachable': - case 'no_cacheBeforePageGen': - case 'tempContent': - case 'pagesTSconfig': - case 'pageCacheTags': - case 'uniqueCounter': - case 'uniqueString': - case 'lang': - case 'MP_defaults': - case 'debug': - case 'pageAccessFailureHistory': - trigger_error('Property $TSFE->' . $propertyName . ' is marked as protected now as it only contains internal state.', E_USER_DEPRECATED); - break; - } - return $this->$propertyName; - } - - /** - * Sets the property of the given name if tagged. - * - * Additionally it's allowed to set unknown properties. - * - * The evaluation is done in the assumption that this method is never - * reached for a public property. - * - * @param string $propertyName - * @param mixed $propertyValue - */ - public function __set(string $propertyName, $propertyValue) - { - switch ($propertyName) { - case 'sys_language_uid': - trigger_error('Property $TSFE->sys_language_uid is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - /** @var LanguageAspect $aspect */ - $aspect = $this->context->getAspect('language'); - $this->context->setAspect('language', GeneralUtility::makeInstance(LanguageAspect::class, (int)$propertyValue, $aspect->getContentId(), $aspect->getOverlayType(), $aspect->getFallbackChain())); - break; - case 'sys_language_content': - trigger_error('Property $TSFE->sys_language_content is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - /** @var LanguageAspect $aspect */ - $aspect = $this->context->getAspect('language'); - $this->context->setAspect('language', GeneralUtility::makeInstance(LanguageAspect::class, $aspect->getId(), (int)$propertyValue, $aspect->getOverlayType(), $aspect->getFallbackChain())); - break; - case 'sys_language_contentOL': - trigger_error('Property $TSFE->sys_language_contentOL is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - /** @var LanguageAspect $aspect */ - $aspect = $this->context->getAspect('language'); - switch ((string)$propertyValue) { - case 'hideNonTranslated': - $overlayType = LanguageAspect::OVERLAYS_ON_WITH_FLOATING; - break; - case '1': - $overlayType = LanguageAspect::OVERLAYS_MIXED; - break; - default: - $overlayType = LanguageAspect::OVERLAYS_OFF; - } - $this->context->setAspect('language', GeneralUtility::makeInstance(LanguageAspect::class, $aspect->getId(), $aspect->getContentId(), $overlayType, $aspect->getFallbackChain())); - break; - case 'sys_language_mode': - trigger_error('Property $TSFE->sys_language_mode is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - /** @var LanguageAspect $aspect */ - $aspect = $this->context->getAspect('language'); - switch ((string)$propertyValue) { - case 'strict': - $fallBackOrder = []; - break; - // Ignore anything if a page cannot be found, and resolve pageId=0 instead. - case 'ignore': - $fallBackOrder = [-1]; - break; - case 'fallback': - case 'content_fallback': - if (!empty($propertyValue)) { - $fallBackOrder = GeneralUtility::trimExplode(',', $propertyValue); - // no strict typing explictly done here - if (!in_array(0, $fallBackOrder) && !in_array('pageNotFound', $fallBackOrder)) { - $fallBackOrder[] = 'pageNotFound'; - } - } else { - $fallBackOrder = [0]; - } - break; - case '': - $fallBackOrder = ['off']; - break; - default: - $fallBackOrder = [0]; - } - $this->context->setAspect('language', GeneralUtility::makeInstance(LanguageAspect::class, $aspect->getId(), $aspect->getContentId(), $aspect->getOverlayType(), $fallBackOrder)); - break; - case 'loginUser': - trigger_error('Property $TSFE->loginUser is not in use anymore as this information is now stored within the frontend.user aspect.', E_USER_DEPRECATED); - /** @var UserAspect $aspect */ - $aspect = $this->context->getAspect('frontend.user'); - if ($propertyValue) { - $aspect = GeneralUtility::makeInstance(UserAspect::class, $this->fe_user ?: null, $aspect->getGroupIds()); - } else { - $aspect = GeneralUtility::makeInstance(UserAspect::class, null, $aspect->getGroupIds()); - } - $this->context->setAspect('frontend.user', $aspect); - break; - case 'gr_list': - trigger_error('Property $TSFE->gr_list is not in use anymore as this information is now stored within the frontend.user aspect.', E_USER_DEPRECATED); - $this->context->setAspect('frontend.user', GeneralUtility::makeInstance(UserAspect::class, $this->fe_user ?: null, GeneralUtility::intExplode(',', $propertyValue))); - break; - case 'beUserLogin': - trigger_error('Property $TSFE->beUserLogin is not in use anymore as this information is now stored within the backend.user aspect.', E_USER_DEPRECATED); - if ($propertyValue) { - $aspect = GeneralUtility::makeInstance(UserAspect::class, $GLOBALS['BE_USER']); - } else { - $aspect = GeneralUtility::makeInstance(UserAspect::class); - } - $this->context->setAspect('backend.user', $aspect); - break; - case 'showHiddenPage': - case 'showHiddenRecords': - trigger_error('Property $TSFE->' . $propertyName . ' is not in use anymore as this information is now stored within the visibility aspect.', E_USER_DEPRECATED); - /** @var VisibilityAspect $aspect */ - $aspect = $this->context->getAspect('visibility'); - if ($propertyName === 'showHiddenPage') { - $newAspect = GeneralUtility::makeInstance(VisibilityAspect::class, (bool)$propertyValue, $aspect->includeHiddenContent(), $aspect->includeDeletedRecords()); - } else { - $newAspect = GeneralUtility::makeInstance(VisibilityAspect::class, $aspect->includeHiddenPages(), (bool)$propertyValue, $aspect->includeDeletedRecords()); - } - $this->context->setAspect('visibility', $newAspect); - break; - case 'ADMCMD_preview_BEUSER_uid': - trigger_error('Property $TSFE->ADMCMD_preview_BEUSER_uid is not in use anymore as this information is now stored within the backend.user aspect.', E_USER_DEPRECATED); - // No need to update an aspect here - break; - case 'workspacePreview': - trigger_error('Property $TSFE->workspacePreview is not in use anymore as this information is now stored within the workspace aspect.', E_USER_DEPRECATED); - $this->context->setAspect('workspace', GeneralUtility::makeInstance(WorkspaceAspect::class, (int)$propertyValue)); - break; - case 'loginAllowedInBranch': - trigger_error('Property $TSFE->loginAllowedInBranch is marked as protected now as it only contains internal state. Use checkIfLoginAllowedInBranch() instead.', E_USER_DEPRECATED); - break; - // Regular deprecations / property visibility changes - case 'loginAllowedInBranch_mode': - case 'cacheTimeOutDefault': - case 'cacheContentFlag': - case 'cacheExpires': - case 'isClientCachable': - case 'no_cacheBeforePageGen': - case 'tempContent': - case 'pagesTSconfig': - case 'pageCacheTags': - case 'uniqueCounter': - case 'uniqueString': - case 'lang': - case 'MP_defaults': - case 'debug': - case 'pageAccessFailureHistory': - trigger_error('Property $TSFE->' . $propertyName . ' is marked as protected now as it only contains internal state.', E_USER_DEPRECATED); - break; - } - $this->$propertyName = $propertyValue; - } - - /** - * Unsets the property of the given name if tagged. - * - * @param string $propertyName - */ - public function __unset(string $propertyName) - { - switch ($propertyName) { - case 'sys_language_uid': - trigger_error('Property $TSFE->sys_language_uid is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - $this->context->setAspect('language', GeneralUtility::makeInstance(LanguageAspect::class)); - break; - case 'sys_language_content': - trigger_error('Property $TSFE->sys_language_content is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - /** @var LanguageAspect $aspect */ - $aspect = $this->context->getAspect('language'); - $this->context->setAspect('language', GeneralUtility::makeInstance(LanguageAspect::class, $aspect->getId(), 0, $aspect->getOverlayType())); - break; - case 'sys_language_contentOL': - trigger_error('Property $TSFE->sys_language_contentOL is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - /** @var LanguageAspect $aspect */ - $aspect = $this->context->getAspect('language'); - $this->context->setAspect('language', GeneralUtility::makeInstance(LanguageAspect::class, $aspect->getId(), $aspect->getContentId(), LanguageAspect::OVERLAYS_OFF)); - break; - case 'sys_language_mode': - trigger_error('Property $TSFE->sys_language_mode is not in use anymore as this information is now stored within the language aspect.', E_USER_DEPRECATED); - /** @var LanguageAspect $aspect */ - $aspect = $this->context->getAspect('language'); - $this->context->setAspect('language', GeneralUtility::makeInstance(LanguageAspect::class, $aspect->getId(), $aspect->getContentId(), $aspect->getOverlayType(), ['off'])); - break; - case 'loginUser': - /** @var UserAspect $aspect */ - $aspect = $this->context->getAspect('frontend.user'); - $this->context->setAspect('frontend.user', GeneralUtility::makeInstance(UserAspect::class, null, $aspect->getGroupIds())); - break; - case 'gr_list': - trigger_error('Property $TSFE->gr_list is not in use anymore as this information is now stored within the frontend.user aspect.', E_USER_DEPRECATED); - $this->context->setAspect('frontend.user', GeneralUtility::makeInstance(UserAspect::class, $this->fe_user ?: null, [])); - break; - case 'beUserLogin': - trigger_error('Property $TSFE->beUserLogin is not in use anymore as this information is now stored within the backend.user aspect.', E_USER_DEPRECATED); - $this->context->setAspect('backend.user', GeneralUtility::makeInstance(UserAspect::class)); - break; - case 'showHiddenPage': - case 'showHiddenRecords': - trigger_error('Property $TSFE->' . $propertyName . ' is not in use anymore as this information is now stored within the visibility aspect.', E_USER_DEPRECATED); - /** @var VisibilityAspect $aspect */ - $aspect = $this->context->getAspect('visibility'); - if ($propertyName === 'showHiddenPage') { - $newAspect = GeneralUtility::makeInstance(VisibilityAspect::class, false, $aspect->includeHiddenContent(), $aspect->includeDeletedRecords()); - } else { - $newAspect = GeneralUtility::makeInstance(VisibilityAspect::class, $aspect->includeHiddenPages(), false, $aspect->includeDeletedRecords()); - } - $this->context->setAspect('visibility', $newAspect); - break; - case 'ADMCMD_preview_BEUSER_uid': - trigger_error('Property $TSFE->ADMCMD_preview_BEUSER_uid is not in use anymore as this information is now stored within the backend.user aspect.', E_USER_DEPRECATED); - // No need to update an aspect here - break; - case 'workspacePreview': - trigger_error('Property $TSFE->workspacePreview is not in use anymore as this information is now stored within the workspace aspect.', E_USER_DEPRECATED); - $this->context->setAspect('workspace', GeneralUtility::makeInstance(WorkspaceAspect::class, 0)); - break; - case 'loginAllowedInBranch': - trigger_error('Property $TSFE->loginAllowedInBranch is marked as protected now as it only contains internal state. Use checkIfLoginAllowedInBranch() instead.', E_USER_DEPRECATED); - break; - // Regular deprecations / property visibility changes - case 'loginAllowedInBranch_mode': - case 'cacheTimeOutDefault': - case 'cacheContentFlag': - case 'cacheExpires': - case 'isClientCachable': - case 'no_cacheBeforePageGen': - case 'tempContent': - case 'pagesTSconfig': - case 'uniqueCounter': - case 'uniqueString': - case 'lang': - case 'MP_defaults': - case 'debug': - case 'pageAccessFailureHistory': - trigger_error('Property $TSFE->' . $propertyName . ' is marked as protected now as it only contains internal state.', E_USER_DEPRECATED); - break; - } - unset($this->$propertyName); - } } diff --git a/typo3/sysext/frontend/Classes/Http/RequestHandler.php b/typo3/sysext/frontend/Classes/Http/RequestHandler.php index ced0974a84d3..5d3cd27fdca5 100644 --- a/typo3/sysext/frontend/Classes/Http/RequestHandler.php +++ b/typo3/sysext/frontend/Classes/Http/RequestHandler.php @@ -202,13 +202,6 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf // Store session data for fe_users $controller->fe_user->storeSessionData(); - // @deprecated since TYPO3 v9.3, will be removed in TYPO3 v10.0. - $redirectResponse = $controller->redirectToExternalUrl(true); - if ($redirectResponse instanceof ResponseInterface) { - $controller->sendHttpHeadersDirectly(); - return $redirectResponse; - } - // Statistics $GLOBALS['TYPO3_MISC']['microtime_end'] = microtime(true); if ($isOutputting && ($controller->config['config']['debug'] ?? !empty($GLOBALS['TYPO3_CONF_VARS']['FE']['debug']))) { @@ -552,29 +545,6 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf if (trim($style)) { $this->addCssToPageRenderer($controller, $style, true, 'additionalTSFEInlineStyle'); } - // Javascript Libraries - if (isset($controller->pSetup['javascriptLibs.']) && is_array($controller->pSetup['javascriptLibs.'])) { - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0, the setting page.javascriptLibs has been deprecated and will be removed in TYPO3 v10.0. - trigger_error('The setting page.javascriptLibs will be removed in TYPO3 v10.0.', E_USER_DEPRECATED); - - // Include jQuery into the page renderer - if (!empty($controller->pSetup['javascriptLibs.']['jQuery'])) { - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0, the setting page.javascriptLibs.jQuery has been deprecated and will be removed in TYPO3 v10.0. - trigger_error('The setting page.javascriptLibs.jQuery will be removed in TYPO3 v10.0.', E_USER_DEPRECATED); - - $jQueryTS = $controller->pSetup['javascriptLibs.']['jQuery.']; - // Check if version / source is set, if not set variable to "NULL" to use the default of the page renderer - $version = $jQueryTS['version'] ?? null; - $source = $jQueryTS['source'] ?? null; - // When "noConflict" is not set or "1" enable the default jQuery noConflict mode, otherwise disable the namespace - if (!isset($jQueryTS['noConflict']) || !empty($jQueryTS['noConflict'])) { - $namespace = 'noConflict'; - } else { - $namespace = PageRenderer::JQUERY_NAMESPACE_NONE; - } - $pageRenderer->loadJquery($version, $source, $namespace, true); - } - } // JavaScript library files if (isset($controller->pSetup['includeJSLibs.']) && is_array($controller->pSetup['includeJSLibs.'])) { foreach ($controller->pSetup['includeJSLibs.'] as $key => $JSfile) { @@ -949,13 +919,6 @@ class RequestHandler implements RequestHandlerInterface, PsrRequestHandlerInterf if ($controller->config['config']['concatenateJs'] ?? false) { $pageRenderer->enableConcatenateJavascript(); } - // Backward compatibility for old configuration - // @deprecated - remove this option in TYPO3 v10.0. - if ($controller->config['config']['concatenateJsAndCss'] ?? false) { - trigger_error('Setting config.concatenateJsAndCss is deprecated in favor of config.concatenateJs and config.concatenateCss, and will have no effect anymore in TYPO3 v10.0.', E_USER_DEPRECATED); - $pageRenderer->enableConcatenateCss(); - $pageRenderer->enableConcatenateJavascript(); - } // Add header data block if ($controller->additionalHeaderData) { $pageRenderer->addHeaderData(implode(LF, $controller->additionalHeaderData)); diff --git a/typo3/sysext/frontend/Classes/Http/UrlHandlerInterface.php b/typo3/sysext/frontend/Classes/Http/UrlHandlerInterface.php deleted file mode 100644 index 123f1eb1c7f4..000000000000 --- a/typo3/sysext/frontend/Classes/Http/UrlHandlerInterface.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -namespace TYPO3\CMS\Frontend\Http; - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -/** - * This interface needs to be implemented by all classes that register for the hook in: - * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['urlProcessing']['urlHandlers'] - * - * It can be used to do custom URL processing during a Frontend request. - * @deprecated since TYPO3 v9.3, will be removed in TYPO3 v10.0 in favor of PSR-15 middlewares. - */ -interface UrlHandlerInterface -{ - /** - * Return TRUE if this hook handles the current URL. - * Warning! If TRUE is returned content rendering will be disabled! - * This method will be called in the constructor of the TypoScriptFrontendController - * - * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::__construct() - * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::initializeRedirectUrlHandlers() - * @return bool - */ - public function canHandleCurrentUrl(); - - /** - * Custom processing of the current URL. - * - * If canHandle() has returned TRUE this method needs to take care of redirecting the user or generating custom output. - * This hook will be called BEFORE the user is redirected to an external URL configured in the page properties. - * - * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::redirectToExternalUrl() - */ - public function handle(); -} diff --git a/typo3/sysext/frontend/Classes/Middleware/PageResolver.php b/typo3/sysext/frontend/Classes/Middleware/PageResolver.php index f99baf705660..7197ebedbfc6 100644 --- a/typo3/sysext/frontend/Classes/Middleware/PageResolver.php +++ b/typo3/sysext/frontend/Classes/Middleware/PageResolver.php @@ -137,9 +137,6 @@ class PageResolver implements MiddlewareInterface // At this point, we later get further route modifiers // for bw-compat we update $GLOBALS[TYPO3_REQUEST] to be used later in TSFE. $GLOBALS['TYPO3_REQUEST'] = $request; - } else { - // old-school page resolving for realurl, cooluri etc. - $this->controller->siteScript = $request->getAttribute('normalizedParams')->getSiteScript(); } $this->controller->determineId(); diff --git a/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php b/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php index eab6c9e7f538..8452c9cff86c 100644 --- a/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php +++ b/typo3/sysext/frontend/Classes/Middleware/PrepareTypoScriptFrontendRendering.php @@ -102,9 +102,6 @@ class PrepareTypoScriptFrontendRendering implements MiddlewareInterface $request = $request->withParsedBody($parsedBody); $GLOBALS['TYPO3_REQUEST'] = $request; } - - // @deprecated since TYPO3 v9.3, will be removed in TYPO3 v10.0 - $this->controller->initializeRedirectUrlHandlers(true); return $handler->handle($request); } diff --git a/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php b/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php index 19dd8edf6427..845462e4f11f 100644 --- a/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php +++ b/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php @@ -79,6 +79,7 @@ class SiteBaseRedirectResolver implements MiddlewareInterface } return $handler->handle($request); } + /** * Checks if the language is allowed in Frontend, if not, check if there is valid BE user * diff --git a/typo3/sysext/frontend/Classes/Page/ExternalPageUrlHandler.php b/typo3/sysext/frontend/Classes/Page/ExternalPageUrlHandler.php deleted file mode 100644 index 26b844b3ebd6..000000000000 --- a/typo3/sysext/frontend/Classes/Page/ExternalPageUrlHandler.php +++ /dev/null @@ -1,73 +0,0 @@ -<?php -declare(strict_types = 1); -namespace TYPO3\CMS\Frontend\Page; - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -use Psr\Http\Message\ResponseInterface; -use TYPO3\CMS\Core\Http\RedirectResponse; -use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; - -/** - * Handles the redirection for external URL pages. - * @deprecated since TYPO3 v9.3, will be removed in TYPO3 v10.0. The functionality has been moved into a PSR-15 middleware. - */ -class ExternalPageUrlHandler implements \TYPO3\CMS\Frontend\Http\UrlHandlerInterface -{ - /** - * @var string - */ - protected $externalUrl = ''; - - public function __construct() - { - trigger_error('ExternalPageUrlHandler has been moved into a PSR-15 middleware and will be removed in TYPO3 v10.0. In order to modify the external page redirection, use a PSR-15 middleware as well.', E_USER_DEPRECATED); - } - - /** - * Checks if external URLs are enabled and if the current page points to an external URL. - * - * @return bool - */ - public function canHandleCurrentUrl(): bool - { - $tsfe = $this->getTypoScriptFrontendController(); - - if (!empty($tsfe->config['config']['disablePageExternalUrl'])) { - return false; - } - - $this->externalUrl = $tsfe->sys_page->getExtURL($tsfe->page); - if (empty($this->externalUrl)) { - return false; - } - return true; - } - - /** - * Redirects the user to the detected external URL. - */ - public function handle(): ResponseInterface - { - return new RedirectResponse($this->externalUrl, 303); - } - - /** - * @return TypoScriptFrontendController - */ - protected function getTypoScriptFrontendController(): TypoScriptFrontendController - { - return $GLOBALS['TSFE']; - } -} diff --git a/typo3/sysext/frontend/Classes/Page/PageGenerator.php b/typo3/sysext/frontend/Classes/Page/PageGenerator.php deleted file mode 100644 index d997077ab299..000000000000 --- a/typo3/sysext/frontend/Classes/Page/PageGenerator.php +++ /dev/null @@ -1,1049 +0,0 @@ -<?php -namespace TYPO3\CMS\Frontend\Page; - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -use Psr\Http\Message\ServerRequestInterface; -use TYPO3\CMS\Core\Core\Environment; -use TYPO3\CMS\Core\Page\PageRenderer; -use TYPO3\CMS\Core\Site\Entity\SiteLanguage; -use TYPO3\CMS\Core\TimeTracker\TimeTracker; -use TYPO3\CMS\Core\Type\File\ImageInfo; -use TYPO3\CMS\Core\TypoScript\TypoScriptService; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Core\Utility\MathUtility; -use TYPO3\CMS\Core\Utility\PathUtility; -use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; -use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; -use TYPO3\CMS\Frontend\Resource\FilePathSanitizer; - -/** - * Class for starting TypoScript page generation - * - * The class is not instantiated as an objects but called directly with the "::" operator. - * @deprecated this class will be removed in TYPO3 v10.0, as all functionality has been built in RequestHandler already. - */ -class PageGenerator -{ - /** - * Do not render title tag - * Typoscript setting: [config][noPageTitle] - * @deprecated will not be used anymore, and will be removed in TYPO3 v10.0. - */ - const NO_PAGE_TITLE = 2; - - /** - * Rendering the page content - * @deprecated since TYPO3 v9.4 will be removed in TYPO3 v10.0. This functionality is now within RequestHandler. - */ - public static function renderContent() - { - trigger_error('PageGenerator::renderContent() will be removed in TYPO3 v10.0. This logic is now built in TYPO3s Frontend RequestHandler.', E_USER_DEPRECATED); - /** @var TypoScriptFrontendController $tsfe */ - $tsfe = $GLOBALS['TSFE']; - - /** @var TimeTracker $timeTracker */ - $timeTracker = GeneralUtility::makeInstance(TimeTracker::class); - - // PAGE CONTENT - $timeTracker->incStackPointer(); - $timeTracker->push($tsfe->sPre, 'PAGE'); - $pageContent = $tsfe->cObj->cObjGet($tsfe->pSetup); - if ($tsfe->pSetup['wrap']) { - $pageContent = $tsfe->cObj->wrap($pageContent, $tsfe->pSetup['wrap']); - } - if ($tsfe->pSetup['stdWrap.']) { - $pageContent = $tsfe->cObj->stdWrap($pageContent, $tsfe->pSetup['stdWrap.']); - } - // PAGE HEADER (after content - maybe JS is inserted! - // if 'disableAllHeaderCode' is set, all the header-code is discarded! - if ($tsfe->config['config']['disableAllHeaderCode']) { - $tsfe->content = $pageContent; - } else { - self::renderContentWithHeader($pageContent); - } - $timeTracker->pull($timeTracker->LR ? $tsfe->content : ''); - $timeTracker->decStackPointer(); - } - - /** - * Rendering normal HTML-page with header by wrapping the generated content ($pageContent) in body-tags and setting the header accordingly. - * - * @param string $pageContent The page content which TypoScript objects has generated - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. This functionality is now within TYPO3's Frontend Request Handler. - */ - public static function renderContentWithHeader($pageContent) - { - trigger_error('PageGenerator::renderContentWithHeader() will be removed in TYPO3 v10.0. This logic is now built in TYPO3s Frontend RequestHandler.', E_USER_DEPRECATED); - /** @var TypoScriptFrontendController $tsfe */ - $tsfe = $GLOBALS['TSFE']; - - /** @var TimeTracker $timeTracker */ - $timeTracker = GeneralUtility::makeInstance(TimeTracker::class); - - $pageRenderer = static::getPageRenderer(); - if ($tsfe->config['config']['moveJsFromHeaderToFooter'] ?? false) { - $pageRenderer->enableMoveJsFromHeaderToFooter(); - } - if ($tsfe->config['config']['pageRendererTemplateFile'] ?? false) { - try { - $file = GeneralUtility::makeInstance(FilePathSanitizer::class)->sanitize($tsfe->config['config']['pageRendererTemplateFile']); - $pageRenderer->setTemplateFile($file); - } catch (\TYPO3\CMS\Core\Resource\Exception $e) { - // do nothing - } - } - $headerComment = $tsfe->config['config']['headerComment'] ?? null; - if (trim($headerComment)) { - $pageRenderer->addInlineComment("\t" . str_replace(LF, LF . "\t", trim($headerComment)) . LF); - } - // Setting charset: - $theCharset = $tsfe->metaCharset; - // Reset the content variables: - $tsfe->content = ''; - $htmlTagAttributes = []; - $htmlLang = $tsfe->config['config']['htmlTag_langKey'] ?? ($tsfe->sys_language_isocode ?: 'en'); - // Set content direction - // More info: http://www.tau.ac.il/~danon/Hebrew/HTML_and_Hebrew.html) - $direction = $tsfe->config['config']['htmlTag_dir'] ?? null; - if (self::getCurrentSiteLanguage()) { - $direction = self::getCurrentSiteLanguage()->getDirection(); - $htmlLang = self::getCurrentSiteLanguage()->getTwoLetterIsoCode(); - } - if ($direction) { - $htmlTagAttributes['dir'] = htmlspecialchars($direction); - } - // Setting document type: - $docTypeParts = []; - $xmlDocument = true; - // Part 1: XML prologue - switch ((string)($tsfe->config['config']['xmlprologue'] ?? '')) { - case 'none': - $xmlDocument = false; - break; - case 'xml_10': - $docTypeParts[] = '<?xml version="1.0" encoding="' . $theCharset . '"?>'; - break; - case 'xml_11': - $docTypeParts[] = '<?xml version="1.1" encoding="' . $theCharset . '"?>'; - break; - case '': - if ($tsfe->xhtmlVersion) { - $docTypeParts[] = '<?xml version="1.0" encoding="' . $theCharset . '"?>'; - } else { - $xmlDocument = false; - } - break; - default: - $docTypeParts[] = $tsfe->config['config']['xmlprologue']; - } - // Part 2: DTD - $doctype = $tsfe->config['config']['doctype'] ?? null; - if ($doctype) { - switch ($doctype) { - case 'xhtml_trans': - $docTypeParts[] = '<!DOCTYPE html - PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'; - break; - case 'xhtml_strict': - $docTypeParts[] = '<!DOCTYPE html - PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; - break; - case 'xhtml_basic': - $docTypeParts[] = '<!DOCTYPE html - PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" - "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">'; - break; - case 'xhtml_11': - $docTypeParts[] = '<!DOCTYPE html - PUBLIC "-//W3C//DTD XHTML 1.1//EN" - "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'; - break; - case 'xhtml+rdfa_10': - $docTypeParts[] = '<!DOCTYPE html - PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" - "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">'; - break; - case 'html5': - $docTypeParts[] = '<!DOCTYPE html>'; - if ($xmlDocument) { - $pageRenderer->setMetaCharsetTag('<meta charset="|" />'); - } else { - $pageRenderer->setMetaCharsetTag('<meta charset="|">'); - } - break; - case 'none': - break; - default: - $docTypeParts[] = $doctype; - } - } else { - $docTypeParts[] = '<!DOCTYPE html>'; - if ($xmlDocument) { - $pageRenderer->setMetaCharsetTag('<meta charset="|" />'); - } else { - $pageRenderer->setMetaCharsetTag('<meta charset="|">'); - } - } - if ($tsfe->xhtmlVersion) { - $htmlTagAttributes['xml:lang'] = $htmlLang; - } - if ($tsfe->xhtmlVersion < 110 || $doctype === 'html5') { - $htmlTagAttributes['lang'] = $htmlLang; - } - if ($tsfe->xhtmlVersion || $doctype === 'html5' && $xmlDocument) { - // We add this to HTML5 to achieve a slightly better backwards compatibility - $htmlTagAttributes['xmlns'] = 'http://www.w3.org/1999/xhtml'; - if (is_array($tsfe->config['config']['namespaces.'])) { - foreach ($tsfe->config['config']['namespaces.'] as $prefix => $uri) { - // $uri gets htmlspecialchared later - $htmlTagAttributes['xmlns:' . htmlspecialchars($prefix)] = $uri; - } - } - } - // Swap XML and doctype order around (for MSIE / Opera standards compliance) - if ($tsfe->config['config']['doctypeSwitch'] ?? false) { - $docTypeParts = array_reverse($docTypeParts); - } - // Adding doctype parts: - if (!empty($docTypeParts)) { - $pageRenderer->setXmlPrologAndDocType(implode(LF, $docTypeParts)); - } - // Begin header section: - if (is_array($tsfe->config['config']['htmlTag.']['attributes.'] ?? null)) { - $_attr = ''; - foreach ($tsfe->config['config']['htmlTag.']['attributes.'] as $attributeName => $value) { - $_attr .= ' ' . htmlspecialchars($attributeName) . ($value !== '' ? '="' . htmlspecialchars((string)$value) . '"' : ''); - // If e.g. "htmlTag.attributes.dir" is set, make sure it is not added again with "implodeAttributes()" - if (isset($htmlTagAttributes[$attributeName])) { - unset($htmlTagAttributes[$attributeName]); - } - } - $_attr = GeneralUtility::implodeAttributes($htmlTagAttributes) . $_attr; - } elseif (($tsfe->config['config']['htmlTag_setParams'] ?? '') === 'none') { - $_attr = ''; - } elseif (isset($tsfe->config['config']['htmlTag_setParams'])) { - $_attr = $tsfe->config['config']['htmlTag_setParams']; - } else { - $_attr = GeneralUtility::implodeAttributes($htmlTagAttributes); - } - $htmlTag = '<html' . ($_attr ? ' ' . $_attr : '') . '>'; - if (isset($tsfe->config['config']['htmlTag_stdWrap.'])) { - $htmlTag = $tsfe->cObj->stdWrap($htmlTag, $tsfe->config['config']['htmlTag_stdWrap.']); - } - $pageRenderer->setHtmlTag($htmlTag); - // Head tag: - $headTag = $tsfe->pSetup['headTag'] ?? '<head>'; - if (isset($tsfe->pSetup['headTag.'])) { - $headTag = $tsfe->cObj->stdWrap($headTag, $tsfe->pSetup['headTag.']); - } - $pageRenderer->setHeadTag($headTag); - // Setting charset meta tag: - $pageRenderer->setCharSet($theCharset); - $pageRenderer->addInlineComment(' This website is powered by TYPO3 - inspiring people to share! - TYPO3 is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL. - TYPO3 is copyright ' . TYPO3_copyright_year . ' of Kasper Skaarhoj. Extensions are copyright of their respective owners. - Information and contribution at ' . TYPO3_URL_GENERAL . ' -'); - if ($tsfe->baseUrl) { - $pageRenderer->setBaseUrl($tsfe->baseUrl); - } - if ($tsfe->pSetup['shortcutIcon'] ?? false) { - try { - $favIcon = GeneralUtility::makeInstance(FilePathSanitizer::class)->sanitize($tsfe->pSetup['shortcutIcon']); - $iconFileInfo = GeneralUtility::makeInstance(ImageInfo::class, Environment::getPublicPath() . '/' . $favIcon); - if ($iconFileInfo->isFile()) { - $iconMimeType = $iconFileInfo->getMimeType(); - if ($iconMimeType) { - $iconMimeType = ' type="' . $iconMimeType . '"'; - $pageRenderer->setIconMimeType($iconMimeType); - } - $pageRenderer->setFavIcon(PathUtility::getAbsoluteWebPath($tsfe->absRefPrefix . $favIcon)); - } - } catch (\TYPO3\CMS\Core\Resource\Exception $e) { - // do nothing - } - } - // Including CSS files - if (isset($tsfe->tmpl->setup['plugin.']) && is_array($tsfe->tmpl->setup['plugin.'])) { - $stylesFromPlugins = ''; - foreach ($tsfe->tmpl->setup['plugin.'] as $key => $iCSScode) { - if (is_array($iCSScode)) { - if ($iCSScode['_CSS_DEFAULT_STYLE'] && empty($tsfe->config['config']['removeDefaultCss'])) { - if (isset($iCSScode['_CSS_DEFAULT_STYLE.'])) { - $cssDefaultStyle = $tsfe->cObj->stdWrap($iCSScode['_CSS_DEFAULT_STYLE'], $iCSScode['_CSS_DEFAULT_STYLE.']); - } else { - $cssDefaultStyle = $iCSScode['_CSS_DEFAULT_STYLE']; - } - $stylesFromPlugins .= '/* default styles for extension "' . substr($key, 0, -1) . '" */' . LF . $cssDefaultStyle . LF; - } - if ($iCSScode['_CSS_PAGE_STYLE'] && empty($tsfe->config['config']['removePageCss'])) { - $cssPageStyle = implode(LF, $iCSScode['_CSS_PAGE_STYLE']); - if (isset($iCSScode['_CSS_PAGE_STYLE.'])) { - $cssPageStyle = $tsfe->cObj->stdWrap($cssPageStyle, $iCSScode['_CSS_PAGE_STYLE.']); - } - $cssPageStyle = '/* specific page styles for extension "' . substr($key, 0, -1) . '" */' . LF . $cssPageStyle; - self::addCssToPageRenderer($cssPageStyle, true, 'InlinePageCss'); - } - } - } - if (!empty($stylesFromPlugins)) { - self::addCssToPageRenderer($stylesFromPlugins, false, 'InlineDefaultCss'); - } - } - /**********************************************************************/ - /* config.includeCSS / config.includeCSSLibs - /**********************************************************************/ - if (isset($tsfe->pSetup['includeCSS.']) && is_array($tsfe->pSetup['includeCSS.'])) { - foreach ($tsfe->pSetup['includeCSS.'] as $key => $CSSfile) { - if (!is_array($CSSfile)) { - $cssFileConfig = &$tsfe->pSetup['includeCSS.'][$key . '.']; - if (isset($cssFileConfig['if.']) && !$tsfe->cObj->checkIf($cssFileConfig['if.'])) { - continue; - } - if ($cssFileConfig['external']) { - $ss = $CSSfile; - } else { - try { - $ss = GeneralUtility::makeInstance(FilePathSanitizer::class)->sanitize($CSSfile); - } catch (\TYPO3\CMS\Core\Resource\Exception $e) { - $ss = null; - } - } - if ($ss) { - if ($cssFileConfig['import']) { - if (!$cssFileConfig['external'] && $ss[0] !== '/') { - // To fix MSIE 6 that cannot handle these as relative paths (according to Ben v Ende) - $ss = GeneralUtility::dirname(GeneralUtility::getIndpEnv('SCRIPT_NAME')) . '/' . $ss; - } - $pageRenderer->addCssInlineBlock('import_' . $key, '@import url("' . htmlspecialchars($ss) . '") ' . htmlspecialchars($cssFileConfig['media']) . ';', empty($cssFileConfig['disableCompression']), (bool)$cssFileConfig['forceOnTop']); - } else { - $pageRenderer->addCssFile( - $ss, - $cssFileConfig['alternate'] ? 'alternate stylesheet' : 'stylesheet', - $cssFileConfig['media'] ?: 'all', - $cssFileConfig['title'] ?: '', - $cssFileConfig['external'] ? false : empty($cssFileConfig['disableCompression']), - (bool)$cssFileConfig['forceOnTop'], - $cssFileConfig['allWrap'], - (bool)$cssFileConfig['excludeFromConcatenation'] || (bool)$cssFileConfig['inline'], - $cssFileConfig['allWrap.']['splitChar'], - $cssFileConfig['inline'] - ); - unset($cssFileConfig); - } - } - } - } - } - if (isset($tsfe->pSetup['includeCSSLibs.']) && is_array($tsfe->pSetup['includeCSSLibs.'])) { - foreach ($tsfe->pSetup['includeCSSLibs.'] as $key => $CSSfile) { - if (!is_array($CSSfile)) { - $cssFileConfig = &$tsfe->pSetup['includeCSSLibs.'][$key . '.']; - if (isset($cssFileConfig['if.']) && !$tsfe->cObj->checkIf($cssFileConfig['if.'])) { - continue; - } - if ($cssFileConfig['external']) { - $ss = $CSSfile; - } else { - try { - $ss = GeneralUtility::makeInstance(FilePathSanitizer::class)->sanitize($CSSfile); - } catch (\TYPO3\CMS\Core\Resource\Exception $e) { - $ss = null; - } - } - if ($ss) { - if ($cssFileConfig['import']) { - if (!$cssFileConfig['external'] && $ss[0] !== '/') { - // To fix MSIE 6 that cannot handle these as relative paths (according to Ben v Ende) - $ss = GeneralUtility::dirname(GeneralUtility::getIndpEnv('SCRIPT_NAME')) . '/' . $ss; - } - $pageRenderer->addCssInlineBlock('import_' . $key, '@import url("' . htmlspecialchars($ss) . '") ' . htmlspecialchars($cssFileConfig['media']) . ';', empty($cssFileConfig['disableCompression']), (bool)$cssFileConfig['forceOnTop']); - } else { - $pageRenderer->addCssLibrary( - $ss, - $cssFileConfig['alternate'] ? 'alternate stylesheet' : 'stylesheet', - $cssFileConfig['media'] ?: 'all', - $cssFileConfig['title'] ?: '', - $cssFileConfig['external'] ? false : empty($cssFileConfig['disableCompression']), - (bool)$cssFileConfig['forceOnTop'], - $cssFileConfig['allWrap'], - (bool)$cssFileConfig['excludeFromConcatenation'] || (bool)$cssFileConfig['inline'], - $cssFileConfig['allWrap.']['splitChar'], - $cssFileConfig['inline'] - ); - unset($cssFileConfig); - } - } - } - } - } - - // CSS_inlineStyle from TS - $style = trim($tsfe->pSetup['CSS_inlineStyle'] ?? ''); - $style .= $tsfe->cObj->cObjGet($tsfe->pSetup['cssInline.'] ?? null, 'cssInline.'); - if (trim($style)) { - self::addCssToPageRenderer($style, true, 'additionalTSFEInlineStyle'); - } - // Javascript Libraries - if (isset($tsfe->pSetup['javascriptLibs.']) && is_array($tsfe->pSetup['javascriptLibs.'])) { - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0, the setting page.javascriptLibs has been deprecated and will be removed in TYPO3 v10.0. - trigger_error('The setting page.javascriptLibs will be removed in TYPO3 v10.0.', E_USER_DEPRECATED); - - // Include jQuery into the page renderer - if (!empty($tsfe->pSetup['javascriptLibs.']['jQuery'])) { - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0, the setting page.javascriptLibs.jQuery has been deprecated and will be removed in TYPO3 v10.0. - trigger_error('The setting page.javascriptLibs.jQuery will be removed in TYPO3 v10.0.', E_USER_DEPRECATED); - - $jQueryTS = $tsfe->pSetup['javascriptLibs.']['jQuery.']; - // Check if version / source is set, if not set variable to "NULL" to use the default of the page renderer - $version = $jQueryTS['version'] ?? null; - $source = $jQueryTS['source'] ?? null; - // When "noConflict" is not set or "1" enable the default jQuery noConflict mode, otherwise disable the namespace - if (!isset($jQueryTS['noConflict']) || !empty($jQueryTS['noConflict'])) { - $namespace = 'noConflict'; - } else { - $namespace = PageRenderer::JQUERY_NAMESPACE_NONE; - } - $pageRenderer->loadJquery($version, $source, $namespace, true); - } - } - // JavaScript library files - if (isset($tsfe->pSetup['includeJSLibs.']) && is_array($tsfe->pSetup['includeJSLibs.'])) { - foreach ($tsfe->pSetup['includeJSLibs.'] as $key => $JSfile) { - if (!is_array($JSfile)) { - if (isset($tsfe->pSetup['includeJSLibs.'][$key . '.']['if.']) && !$tsfe->cObj->checkIf($tsfe->pSetup['includeJSLibs.'][$key . '.']['if.'])) { - continue; - } - if ($tsfe->pSetup['includeJSLibs.'][$key . '.']['external']) { - $ss = $JSfile; - } else { - try { - $ss = GeneralUtility::makeInstance(FilePathSanitizer::class)->sanitize($JSfile); - } catch (\TYPO3\CMS\Core\Resource\Exception $e) { - $ss = null; - } - } - if ($ss) { - $jsFileConfig = &$tsfe->pSetup['includeJSLibs.'][$key . '.']; - $type = $jsFileConfig['type']; - if (!$type) { - $type = 'text/javascript'; - } - $crossorigin = $jsFileConfig['crossorigin']; - if (!$crossorigin && $jsFileConfig['integrity'] && $jsFileConfig['external']) { - $crossorigin = 'anonymous'; - } - $pageRenderer->addJsLibrary( - $key, - $ss, - $type, - $jsFileConfig['external'] ? false : empty($jsFileConfig['disableCompression']), - (bool)$jsFileConfig['forceOnTop'], - $jsFileConfig['allWrap'], - (bool)$jsFileConfig['excludeFromConcatenation'], - $jsFileConfig['allWrap.']['splitChar'], - (bool)$jsFileConfig['async'], - $jsFileConfig['integrity'], - (bool)$jsFileConfig['defer'], - $crossorigin - ); - unset($jsFileConfig); - } - } - } - } - if (isset($tsfe->pSetup['includeJSFooterlibs.']) && is_array($tsfe->pSetup['includeJSFooterlibs.'])) { - foreach ($tsfe->pSetup['includeJSFooterlibs.'] as $key => $JSfile) { - if (!is_array($JSfile)) { - if (isset($tsfe->pSetup['includeJSFooterlibs.'][$key . '.']['if.']) && !$tsfe->cObj->checkIf($tsfe->pSetup['includeJSFooterlibs.'][$key . '.']['if.'])) { - continue; - } - if ($tsfe->pSetup['includeJSFooterlibs.'][$key . '.']['external']) { - $ss = $JSfile; - } else { - try { - $ss = GeneralUtility::makeInstance(FilePathSanitizer::class)->sanitize($JSfile); - } catch (\TYPO3\CMS\Core\Resource\Exception $e) { - $ss = null; - } - } - if ($ss) { - $jsFileConfig = &$tsfe->pSetup['includeJSFooterlibs.'][$key . '.']; - $type = $jsFileConfig['type']; - if (!$type) { - $type = 'text/javascript'; - } - $crossorigin = $jsFileConfig['crossorigin']; - if (!$crossorigin && $jsFileConfig['integrity'] && $jsFileConfig['external']) { - $crossorigin = 'anonymous'; - } - $pageRenderer->addJsFooterLibrary( - $key, - $ss, - $type, - $jsFileConfig['external'] ? false : empty($jsFileConfig['disableCompression']), - (bool)$jsFileConfig['forceOnTop'], - $jsFileConfig['allWrap'], - (bool)$jsFileConfig['excludeFromConcatenation'], - $jsFileConfig['allWrap.']['splitChar'], - (bool)$jsFileConfig['async'], - $jsFileConfig['integrity'], - (bool)$jsFileConfig['defer'], - $crossorigin - ); - unset($jsFileConfig); - } - } - } - } - // JavaScript files - if (isset($tsfe->pSetup['includeJS.']) && is_array($tsfe->pSetup['includeJS.'])) { - foreach ($tsfe->pSetup['includeJS.'] as $key => $JSfile) { - if (!is_array($JSfile)) { - if (isset($tsfe->pSetup['includeJS.'][$key . '.']['if.']) && !$tsfe->cObj->checkIf($tsfe->pSetup['includeJS.'][$key . '.']['if.'])) { - continue; - } - if ($tsfe->pSetup['includeJS.'][$key . '.']['external']) { - $ss = $JSfile; - } else { - try { - $ss = GeneralUtility::makeInstance(FilePathSanitizer::class)->sanitize($JSfile); - } catch (\TYPO3\CMS\Core\Resource\Exception $e) { - $ss = null; - } - } - if ($ss) { - $jsConfig = &$tsfe->pSetup['includeJS.'][$key . '.']; - $type = $jsConfig['type']; - if (!$type) { - $type = 'text/javascript'; - } - $crossorigin = $jsConfig['crossorigin']; - if (!$crossorigin && $jsConfig['integrity'] && $jsConfig['external']) { - $crossorigin = 'anonymous'; - } - $pageRenderer->addJsFile( - $ss, - $type, - $jsConfig['external'] ? false : empty($jsConfig['disableCompression']), - (bool)$jsConfig['forceOnTop'], - $jsConfig['allWrap'], - (bool)$jsConfig['excludeFromConcatenation'], - $jsConfig['allWrap.']['splitChar'], - (bool)$jsConfig['async'], - $jsConfig['integrity'], - (bool)$jsConfig['defer'], - $crossorigin - ); - unset($jsConfig); - } - } - } - } - if (isset($tsfe->pSetup['includeJSFooter.']) && is_array($tsfe->pSetup['includeJSFooter.'])) { - foreach ($tsfe->pSetup['includeJSFooter.'] as $key => $JSfile) { - if (!is_array($JSfile)) { - if (isset($tsfe->pSetup['includeJSFooter.'][$key . '.']['if.']) && !$tsfe->cObj->checkIf($tsfe->pSetup['includeJSFooter.'][$key . '.']['if.'])) { - continue; - } - if ($tsfe->pSetup['includeJSFooter.'][$key . '.']['external']) { - $ss = $JSfile; - } else { - try { - $ss = GeneralUtility::makeInstance(FilePathSanitizer::class)->sanitize($JSfile); - } catch (\TYPO3\CMS\Core\Resource\Exception $e) { - $ss = null; - } - } - if ($ss) { - $jsConfig = &$tsfe->pSetup['includeJSFooter.'][$key . '.']; - $type = $jsConfig['type']; - if (!$type) { - $type = 'text/javascript'; - } - $crossorigin = $jsConfig['crossorigin']; - if (!$crossorigin && $jsConfig['integrity'] && $jsConfig['external']) { - $crossorigin = 'anonymous'; - } - $pageRenderer->addJsFooterFile( - $ss, - $type, - $jsConfig['external'] ? false : empty($jsConfig['disableCompression']), - (bool)$jsConfig['forceOnTop'], - $jsConfig['allWrap'], - (bool)$jsConfig['excludeFromConcatenation'], - $jsConfig['allWrap.']['splitChar'], - (bool)$jsConfig['async'], - $jsConfig['integrity'], - (bool)$jsConfig['defer'], - $crossorigin - ); - unset($jsConfig); - } - } - } - } - // Headerdata - if (isset($tsfe->pSetup['headerData.']) && is_array($tsfe->pSetup['headerData.'])) { - $pageRenderer->addHeaderData($tsfe->cObj->cObjGet($tsfe->pSetup['headerData.'], 'headerData.')); - } - // Footerdata - if (isset($tsfe->pSetup['footerData.']) && is_array($tsfe->pSetup['footerData.'])) { - $pageRenderer->addFooterData($tsfe->cObj->cObjGet($tsfe->pSetup['footerData.'], 'footerData.')); - } - $tsfe->generatePageTitle(); - - // @internal hook for EXT:seo, will be gone soon, do not use it in your own extensions - $_params = ['page' => $tsfe->page]; - $_ref = ''; - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\CMS\Frontend\Page\PageGenerator']['generateMetaTags'] ?? [] as $_funcRef) { - GeneralUtility::callUserFunction($_funcRef, $_params, $_ref); - } - - static::generateMetaTagHtml( - $tsfe->pSetup['meta.'] ?? [], - $tsfe->cObj - ); - - unset($tsfe->additionalHeaderData['JSCode']); - if (isset($tsfe->config['INTincScript']) && is_array($tsfe->config['INTincScript'])) { - $tsfe->additionalHeaderData['JSCode'] = $tsfe->JSCode; - // Storing the JSCode vars... - $tsfe->config['INTincScript_ext']['divKey'] = $tsfe->uniqueHash(); - $tsfe->config['INTincScript_ext']['additionalHeaderData'] = $tsfe->additionalHeaderData; - // Storing the header-data array - $tsfe->config['INTincScript_ext']['additionalFooterData'] = $tsfe->additionalFooterData; - // Storing the footer-data array - $tsfe->config['INTincScript_ext']['additionalJavaScript'] = $tsfe->additionalJavaScript; - // Storing the JS-data array - $tsfe->config['INTincScript_ext']['additionalCSS'] = $tsfe->additionalCSS; - // Storing the Style-data array - $tsfe->additionalHeaderData = ['<!--HD_' . $tsfe->config['INTincScript_ext']['divKey'] . '-->']; - // Clearing the array - $tsfe->additionalFooterData = ['<!--FD_' . $tsfe->config['INTincScript_ext']['divKey'] . '-->']; - // Clearing the array - $tsfe->divSection .= '<!--TDS_' . $tsfe->config['INTincScript_ext']['divKey'] . '-->'; - } else { - $tsfe->INTincScript_loadJSCode(); - } - $scriptJsCode = ''; - - if ($tsfe->spamProtectEmailAddresses && $tsfe->spamProtectEmailAddresses !== 'ascii') { - $scriptJsCode = ' - // decrypt helper function - function decryptCharcode(n,start,end,offset) { - n = n + offset; - if (offset > 0 && n > end) { - n = start + (n - end - 1); - } else if (offset < 0 && n < start) { - n = end - (start - n - 1); - } - return String.fromCharCode(n); - } - // decrypt string - function decryptString(enc,offset) { - var dec = ""; - var len = enc.length; - for(var i=0; i < len; i++) { - var n = enc.charCodeAt(i); - if (n >= 0x2B && n <= 0x3A) { - dec += decryptCharcode(n,0x2B,0x3A,offset); // 0-9 . , - + / : - } else if (n >= 0x40 && n <= 0x5A) { - dec += decryptCharcode(n,0x40,0x5A,offset); // A-Z @ - } else if (n >= 0x61 && n <= 0x7A) { - dec += decryptCharcode(n,0x61,0x7A,offset); // a-z - } else { - dec += enc.charAt(i); - } - } - return dec; - } - // decrypt spam-protected emails - function linkTo_UnCryptMailto(s) { - location.href = decryptString(s,' . $tsfe->spamProtectEmailAddresses * -1 . '); - } - '; - } - // Add inline JS - $inlineJS = ''; - // defined in php - if (is_array($tsfe->inlineJS)) { - foreach ($tsfe->inlineJS as $key => $val) { - if (!is_array($val)) { - $inlineJS .= LF . $val . LF; - } - } - } - // defined in TS with page.inlineJS - // Javascript inline code - $inline = $tsfe->cObj->cObjGet($tsfe->pSetup['jsInline.'] ?? null, 'jsInline.'); - if ($inline) { - $inlineJS .= LF . $inline . LF; - } - // Javascript inline code for Footer - $inlineFooterJs = $tsfe->cObj->cObjGet($tsfe->pSetup['jsFooterInline.'] ?? null, 'jsFooterInline.'); - // Should minify? - if ($tsfe->config['config']['compressJs'] ?? false) { - $pageRenderer->enableCompressJavascript(); - $minifyErrorScript = ($minifyErrorInline = ''); - $scriptJsCode = GeneralUtility::minifyJavaScript($scriptJsCode, $minifyErrorScript); - if ($minifyErrorScript) { - $timeTracker->setTSlogMessage($minifyErrorScript, 3); - } - if ($inlineJS) { - $inlineJS = GeneralUtility::minifyJavaScript($inlineJS, $minifyErrorInline); - if ($minifyErrorInline) { - $timeTracker->setTSlogMessage($minifyErrorInline, 3); - } - } - if ($inlineFooterJs) { - $inlineFooterJs = GeneralUtility::minifyJavaScript($inlineFooterJs, $minifyErrorInline); - if ($minifyErrorInline) { - $timeTracker->setTSlogMessage($minifyErrorInline, 3); - } - } - } - if (!isset($tsfe->config['config']['removeDefaultJS']) || !$tsfe->config['config']['removeDefaultJS']) { - // include default and inlineJS - if ($scriptJsCode) { - $pageRenderer->addJsInlineCode('_scriptCode', $scriptJsCode, $tsfe->config['config']['compressJs']); - } - if ($inlineJS) { - $pageRenderer->addJsInlineCode('TS_inlineJS', $inlineJS, $tsfe->config['config']['compressJs']); - } - if ($inlineFooterJs) { - $pageRenderer->addJsFooterInlineCode('TS_inlineFooter', $inlineFooterJs, $tsfe->config['config']['compressJs']); - } - } elseif ($tsfe->config['config']['removeDefaultJS'] === 'external') { - /* - * This keeps inlineJS from *_INT Objects from being moved to external files. - * At this point in frontend rendering *_INT Objects only have placeholders instead - * of actual content so moving these placeholders to external files would - * a) break the JS file (syntax errors due to the placeholders) - * b) the needed JS would never get included to the page - * Therefore inlineJS from *_INT Objects must not be moved to external files but - * kept internal. - */ - $inlineJSint = ''; - self::stripIntObjectPlaceholder($inlineJS, $inlineJSint); - if ($inlineJSint) { - $pageRenderer->addJsInlineCode('TS_inlineJSint', $inlineJSint, $tsfe->config['config']['compressJs']); - } - if (trim($scriptJsCode . $inlineJS)) { - $pageRenderer->addJsFile(self::inline2TempFile($scriptJsCode . $inlineJS, 'js'), 'text/javascript', $tsfe->config['config']['compressJs']); - } - if ($inlineFooterJs) { - $inlineFooterJSint = ''; - self::stripIntObjectPlaceholder($inlineFooterJs, $inlineFooterJSint); - if ($inlineFooterJSint) { - $pageRenderer->addJsFooterInlineCode('TS_inlineFooterJSint', $inlineFooterJSint, $tsfe->config['config']['compressJs']); - } - $pageRenderer->addJsFooterFile(self::inline2TempFile($inlineFooterJs, 'js'), 'text/javascript', $tsfe->config['config']['compressJs']); - } - } else { - // Include only inlineJS - if ($inlineJS) { - $pageRenderer->addJsInlineCode('TS_inlineJS', $inlineJS, $tsfe->config['config']['compressJs']); - } - if ($inlineFooterJs) { - $pageRenderer->addJsFooterInlineCode('TS_inlineFooter', $inlineFooterJs, $tsfe->config['config']['compressJs']); - } - } - if (isset($tsfe->pSetup['inlineLanguageLabelFiles.']) && is_array($tsfe->pSetup['inlineLanguageLabelFiles.'])) { - foreach ($tsfe->pSetup['inlineLanguageLabelFiles.'] as $key => $languageFile) { - if (is_array($languageFile)) { - continue; - } - $languageFileConfig = &$tsfe->pSetup['inlineLanguageLabelFiles.'][$key . '.']; - if (isset($languageFileConfig['if.']) && !$tsfe->cObj->checkIf($languageFileConfig['if.'])) { - continue; - } - $pageRenderer->addInlineLanguageLabelFile( - $languageFile, - $languageFileConfig['selectionPrefix'] ?: '', - $languageFileConfig['stripFromSelectionName'] ?: '' - ); - } - } - if (isset($tsfe->pSetup['inlineSettings.']) && is_array($tsfe->pSetup['inlineSettings.'])) { - $pageRenderer->addInlineSettingArray('TS', $tsfe->pSetup['inlineSettings.']); - } - // Compression and concatenate settings - if ($tsfe->config['config']['compressCss'] ?? false) { - $pageRenderer->enableCompressCss(); - } - if ($tsfe->config['config']['compressJs'] ?? false) { - $pageRenderer->enableCompressJavascript(); - } - if ($tsfe->config['config']['concatenateCss'] ?? false) { - $pageRenderer->enableConcatenateCss(); - } - if ($tsfe->config['config']['concatenateJs'] ?? false) { - $pageRenderer->enableConcatenateJavascript(); - } - // Backward compatibility for old configuration - // @deprecated - remove this option in TYPO3 v10.0. - if ($tsfe->config['config']['concatenateJsAndCss'] ?? false) { - trigger_error('Setting config.concatenateJsAndCss is deprecated in favor of config.concatenateJs and config.concatenateCss, and will have no effect anymore in TYPO3 v10.0.', E_USER_DEPRECATED); - $pageRenderer->enableConcatenateCss(); - $pageRenderer->enableConcatenateJavascript(); - } - // Add header data block - if ($tsfe->additionalHeaderData) { - $pageRenderer->addHeaderData(implode(LF, $tsfe->additionalHeaderData)); - } - // Add footer data block - if ($tsfe->additionalFooterData) { - $pageRenderer->addFooterData(implode(LF, $tsfe->additionalFooterData)); - } - // Header complete, now add content - // Bodytag: - if ($tsfe->config['config']['disableBodyTag'] ?? false) { - $bodyTag = ''; - } else { - $defBT = (isset($tsfe->pSetup['bodyTagCObject']) && $tsfe->pSetup['bodyTagCObject']) - ? $tsfe->cObj->cObjGetSingle($tsfe->pSetup['bodyTagCObject'], $tsfe->pSetup['bodyTagCObject.'], 'bodyTagCObject') - : '<body>'; - $bodyTag = (isset($tsfe->pSetup['bodyTag']) && $tsfe->pSetup['bodyTag']) - ? $tsfe->pSetup['bodyTag'] - : $defBT; - if (trim($tsfe->pSetup['bodyTagAdd'] ?? '')) { - $bodyTag = preg_replace('/>$/', '', trim($bodyTag)) . ' ' . trim($tsfe->pSetup['bodyTagAdd']) . '>'; - } - } - $pageRenderer->addBodyContent(LF . $bodyTag); - // Div-sections - if ($tsfe->divSection) { - $pageRenderer->addBodyContent(LF . $tsfe->divSection); - } - // Page content - $pageRenderer->addBodyContent(LF . $pageContent); - if (!empty($tsfe->config['INTincScript']) && is_array($tsfe->config['INTincScript'])) { - // Store the serialized pageRenderer in configuration - $tsfe->config['INTincScript_ext']['pageRenderer'] = serialize($pageRenderer); - // Render complete page, keep placeholders for JavaScript and CSS - $tsfe->content = $pageRenderer->renderPageWithUncachedObjects($tsfe->config['INTincScript_ext']['divKey']); - } else { - // Render complete page - $tsfe->content = $pageRenderer->render(); - } - } - - /************************* - * - * Helper functions - * Remember: Calls internally must still be done on the non-instantiated class: PageGenerator::inline2TempFile() - * - *************************/ - /** - * Searches for placeholder created from *_INT cObjects, removes them from - * $searchString and merges them to $intObjects - * - * @param string $searchString The String which should be cleaned from int-object markers - * @param string $intObjects The String the found int-placeholders are moved to (for further processing) - */ - protected static function stripIntObjectPlaceholder(&$searchString, &$intObjects) - { - $tempArray = []; - preg_match_all('/\\<\\!--INT_SCRIPT.[a-z0-9]*--\\>/', $searchString, $tempArray); - $searchString = preg_replace('/\\<\\!--INT_SCRIPT.[a-z0-9]*--\\>/', '', $searchString); - $intObjects = implode('', $tempArray[0]); - } - - /** - * Writes string to a temporary file named after the md5-hash of the string - * - * @param string $str CSS styles / JavaScript to write to file. - * @param string $ext Extension: "css" or "js - * @return string <script> or <link> tag for the file. - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. This functionality is now within TYPO3's Frontend Request Handler. - */ - public static function inline2TempFile($str, $ext) - { - trigger_error('PageGenerator::inline2TempFile() will be removed in TYPO3 v10.0. This logic is now built in TYPO3s Frontend RequestHandler.', E_USER_DEPRECATED); - // Create filename / tags: - $script = ''; - switch ($ext) { - case 'js': - $script = 'typo3temp/assets/js/' . GeneralUtility::shortMD5($str) . '.js'; - break; - case 'css': - $script = 'typo3temp/assets/css/' . GeneralUtility::shortMD5($str) . '.css'; - break; - } - // Write file - if ($script && !@is_file(Environment::getPublicPath() . '/' . $script)) { - GeneralUtility::writeFileToTypo3tempDir(Environment::getPublicPath() . '/' . $script, $str); - } - return $script; - } - - /** - * Checks if the value defined in "config.linkVars" contains an allowed value. Otherwise, return FALSE which means the value will not be added to any links. - * - * @param string $haystack The string in which to find $needle - * @param string $needle The string to find in $haystack - * @return bool Returns TRUE if $needle matches or is found in $haystack - * - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0, is now called within TSFE itself, if needed outside the regular calculations, reimplement the method on your own. - */ - public static function isAllowedLinkVarValue($haystack, $needle) - { - trigger_error('The method will be removed in TYPO3 v10.0, if needed outside of linkVar calculation, re-implement the method in your own extension.', E_USER_DEPRECATED); - $OK = false; - // Integer - if ($needle === 'int' || $needle === 'integer') { - if (MathUtility::canBeInterpretedAsInteger($haystack)) { - $OK = true; - } - } elseif (preg_match('/^\\/.+\\/[imsxeADSUXu]*$/', $needle)) { - // Regular expression, only "//" is allowed as delimiter - if (@preg_match($needle, $haystack)) { - $OK = true; - } - } elseif (strstr($needle, '-')) { - // Range - if (MathUtility::canBeInterpretedAsInteger($haystack)) { - $range = explode('-', $needle); - if ($range[0] <= $haystack && $range[1] >= $haystack) { - $OK = true; - } - } - } elseif (strstr($needle, '|')) { - // List - // Trim the input - $haystack = str_replace(' ', '', $haystack); - if (strstr('|' . $needle . '|', '|' . $haystack . '|')) { - $OK = true; - } - } elseif ((string)$needle === (string)$haystack) { - // String comparison - $OK = true; - } - return $OK; - } - - /** - * Generate title for page. - * Takes the settings [config][noPageTitle], [config][pageTitleFirst], [config][titleTagFunction] - * [config][pageTitleSeparator] and [config][noPageTitle] into account. - * Furthermore $GLOBALS[TSFE]->altPageTitle is observed. - * - * @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0, as TSFE->generatePageTitle() should be used instead. - */ - public static function generatePageTitle() - { - trigger_error('This method will be removed in TYPO3 v10.0. Use $TSFE->generatePageTitle() instead.', E_USER_DEPRECATED); - $GLOBALS['TSFE']->generatePageTitle(); - } - - /** - * Generate meta tags from meta tag TypoScript - * - * @param array $metaTagTypoScript TypoScript configuration for meta tags (e.g. $GLOBALS['TSFE']->pSetup['meta.']) - * @param ContentObjectRenderer $cObj - */ - protected static function generateMetaTagHtml(array $metaTagTypoScript, ContentObjectRenderer $cObj) - { - $pageRenderer = static::getPageRenderer(); - - /** @var TypoScriptService $typoScriptService */ - $typoScriptService = GeneralUtility::makeInstance(TypoScriptService::class); - $conf = $typoScriptService->convertTypoScriptArrayToPlainArray($metaTagTypoScript); - foreach ($conf as $key => $properties) { - $replace = false; - if (is_array($properties)) { - $nodeValue = $properties['_typoScriptNodeValue'] ?? ''; - $value = trim($cObj->stdWrap($nodeValue, $metaTagTypoScript[$key . '.'])); - if ($value === '' && !empty($properties['value'])) { - $value = $properties['value']; - $replace = false; - } - } else { - $value = $properties; - } - - $attribute = 'name'; - if ((is_array($properties) && !empty($properties['httpEquivalent'])) || strtolower($key) === 'refresh') { - $attribute = 'http-equiv'; - } - if (is_array($properties) && !empty($properties['attribute'])) { - $attribute = $properties['attribute']; - } - if (is_array($properties) && !empty($properties['replace'])) { - $replace = true; - } - - if (!is_array($value)) { - $value = (array)$value; - } - foreach ($value as $subValue) { - if (trim($subValue) !== '') { - $pageRenderer->setMetaTag($attribute, $key, $subValue, [], $replace); - } - } - } - } - - /** - * @return PageRenderer - */ - protected static function getPageRenderer() - { - return GeneralUtility::makeInstance(PageRenderer::class); - } - - /** - * Adds inline CSS code, by respecting the inlineStyle2TempFile option - * - * @param string $cssStyles the inline CSS styling - * @param bool $excludeFromConcatenation option to see if it should be concatenated - * @param string $inlineBlockName the block name to add it - */ - protected static function addCssToPageRenderer($cssStyles, $excludeFromConcatenation = false, $inlineBlockName = 'TSFEinlineStyle') - { - if (empty($GLOBALS['TSFE']->config['config']['inlineStyle2TempFile'])) { - self::getPageRenderer()->addCssInlineBlock($inlineBlockName, $cssStyles, !empty($GLOBALS['TSFE']->config['config']['compressCss'])); - } else { - self::getPageRenderer()->addCssFile( - self::inline2TempFile($cssStyles, 'css'), - 'stylesheet', - 'all', - '', - (bool)$GLOBALS['TSFE']->config['config']['compressCss'], - false, - '', - $excludeFromConcatenation - ); - } - } - - /** - * Returns the currently configured "site language" if a site is configured (= resolved) in the current request. - * - * @internal - */ - protected static function getCurrentSiteLanguage(): ?SiteLanguage - { - if (isset($GLOBALS['TYPO3_REQUEST']) - && $GLOBALS['TYPO3_REQUEST'] instanceof ServerRequestInterface - && $GLOBALS['TYPO3_REQUEST']->getAttribute('language') instanceof SiteLanguage) { - return $GLOBALS['TYPO3_REQUEST']->getAttribute('language'); - } - return null; - } -} diff --git a/typo3/sysext/frontend/Classes/Page/PageRepository.php b/typo3/sysext/frontend/Classes/Page/PageRepository.php index a830d426c9f2..82309e294e8c 100644 --- a/typo3/sysext/frontend/Classes/Page/PageRepository.php +++ b/typo3/sysext/frontend/Classes/Page/PageRepository.php @@ -938,7 +938,6 @@ class PageRepository implements LoggerAwareInterface * * @param array $pagerow The page row to return URL type for * @return string|bool The URL from based on the data from "pages:url". False if not found. - * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::initializeRedirectUrlHandlers() */ public function getExtURL($pagerow) { diff --git a/typo3/sysext/frontend/Classes/Utility/EidUtility.php b/typo3/sysext/frontend/Classes/Utility/EidUtility.php deleted file mode 100644 index 0fabc52d3225..000000000000 --- a/typo3/sysext/frontend/Classes/Utility/EidUtility.php +++ /dev/null @@ -1,148 +0,0 @@ -<?php -namespace TYPO3\CMS\Frontend\Utility; - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -use TYPO3\CMS\Core\Cache\CacheManager; -use TYPO3\CMS\Core\Localization\LanguageService; -use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication; -use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; - -/** - * Tools for scripts using the eID feature of the TYPO3 Frontend. - * Included from \TYPO3\CMS\Frontend\Http\RequestHandler. - * Since scripts using the eID feature does not - * have a full FE environment initialized by default - * this class seeks to provide functions that can - * initialize parts of the FE environment as needed, - * eg. Frontend User session, Database connection etc. - * - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. Ensure to migrate your eID script to a PSR-15 middleware at the right position, where the frontend is boot up at the level you need. - */ -class EidUtility -{ - /** - * Load and initialize Frontend User. Note, this process is slow because - * it creates a calls many objects. Call this method only if necessary! - * - * @return FrontendUserAuthentication Frontend User object (usually known as TSFE->fe_user) - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. Use the FrontendUserAuthenticator PSR-15 middleware to set up the Frontend User. - */ - public static function initFeUser() - { - trigger_error('EidUtility::initFeUser() will be removed in TYPO3 v10.0. Use a PSR-15 middleware instead.', E_USER_DEPRECATED); - // Get TSFE instance. It knows how to initialize the user. - $tsfe = self::getTSFE(); - $tsfe->fe_user = GeneralUtility::makeInstance(FrontendUserAuthentication::class); - // List of pid's acceptable - $pid = GeneralUtility::_GP('pid'); - $tsfe->fe_user->checkPid_value = $pid ? implode(',', GeneralUtility::intExplode(',', $pid)) : 0; - // Check if a session is transferred: - if (GeneralUtility::_GP('FE_SESSION_KEY')) { - $fe_sParts = explode('-', GeneralUtility::_GP('FE_SESSION_KEY')); - // If the session key hash check is OK: - if (md5($fe_sParts[0] . '/' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']) === (string)$fe_sParts[1]) { - $cookieName = FrontendUserAuthentication::getCookieName(); - $_COOKIE[$cookieName] = $fe_sParts[0]; - if (isset($_SERVER['HTTP_COOKIE'])) { - // See http://forge.typo3.org/issues/27740 - $_SERVER['HTTP_COOKIE'] .= ';' . $cookieName . '=' . $fe_sParts[0]; - } - $tsfe->fe_user->forceSetCookie = true; - $tsfe->fe_user->dontSetCookie = false; - unset($cookieName); - } - } - $tsfe->fe_user->start(); - $tsfe->fe_user->unpack_uc(); - - // Call hook for possible manipulation of frontend user object - $_params = ['pObj' => &$tsfe]; - foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser'] ?? [] as $_funcRef) { - GeneralUtility::callUserFunction($_funcRef, $_params, $tsfe); - } - // Return FE user object: - return $tsfe->fe_user; - } - - /** - * Initializes $GLOBALS['LANG'] for use in eID scripts. - * - * @param string $language TYPO3 language code - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. Instantiate the LanguageService by yourself instead. - */ - public static function initLanguage($language = 'default') - { - trigger_error('EidUtility::initLanguage() will be removed in TYPO3 v10.0. Ensure to intantiate the LanguageService by yourself.', E_USER_DEPRECATED); - if (!is_object($GLOBALS['LANG'])) { - $GLOBALS['LANG'] = GeneralUtility::makeInstance(LanguageService::class); - $GLOBALS['LANG']->init($language); - } - } - - /** - * Makes TCA available inside eID - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. Is not needed anymore within eID scripts as TCA is now available at any time - */ - public static function initTCA() - { - trigger_error('EidUtility::initTCA() will be removed in TYPO3 v10.0. Is not needed anymore within eID scripts as TCA is now available at any time.', E_USER_DEPRECATED); - // Some badly made extensions attempt to manipulate TCA in a wrong way - // (inside ext_localconf.php). Therefore $GLOBALS['TCA'] may become an array - // but in fact it is not loaded. The check below ensure that - // TCA is still loaded if such bad extensions are installed - if (!is_array($GLOBALS['TCA']) || !isset($GLOBALS['TCA']['pages'])) { - ExtensionManagementUtility::loadBaseTca(); - } - } - - /** - * Makes TCA for the extension available inside eID. Use this function if - * you need not to include the whole $GLOBALS['TCA']. - * - * @param string $extensionKey Extension key - * @deprecated since TYPO3 v9.4, will be removed in TYPO3 v10.0. - */ - public static function initExtensionTCA($extensionKey) - { - trigger_error('EidUtility::initExtensionTCA() will be removed in TYPO3 v10.0 as it is discouraged to only load ext_tables.php of one extension. Use ExtensionManagementUtility instead.', E_USER_DEPRECATED); - $extTablesPath = ExtensionManagementUtility::extPath($extensionKey, 'ext_tables.php'); - if (file_exists($extTablesPath)) { - $GLOBALS['_EXTKEY'] = $extensionKey; - require_once $extTablesPath; - // We do not need to save restore the value of $GLOBALS['_EXTKEY'] - // because it is not defined to anything real outside of - // ext_tables.php or ext_localconf.php scope. - unset($GLOBALS['_EXTKEY']); - } - } - - /** - * Creating a single static cached instance of TSFE to use with this class. - * - * @return TypoScriptFrontendController - */ - private static function getTSFE(): TypoScriptFrontendController - { - $runtimeCache = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_runtime'); - $tsfe = $runtimeCache->get('eidUtilityTsfe') ?: null; - if ($tsfe === null) { - $tsfe = GeneralUtility::makeInstance(TypoScriptFrontendController::class, null, 0, 0); - $runtimeCache->set('eidUtilityTsfe', $tsfe); - } - return $tsfe; - } -} diff --git a/typo3/sysext/frontend/Tests/UnitDeprecated/Controller/TypoScriptFrontendControllerTest.php b/typo3/sysext/frontend/Tests/UnitDeprecated/Controller/TypoScriptFrontendControllerTest.php deleted file mode 100644 index 88ec859b7243..000000000000 --- a/typo3/sysext/frontend/Tests/UnitDeprecated/Controller/TypoScriptFrontendControllerTest.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php -declare(strict_types = 1); -namespace TYPO3\CMS\Frontend\Tests\UnitDeprecated\Controller; - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; -use TYPO3\TestingFramework\Core\Unit\UnitTestCase; - -/** - * Test case - */ -class TypoScriptFrontendControllerTest extends UnitTestCase -{ - /** - * @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface|TypoScriptFrontendController - */ - protected $subject; - - protected function setUp() - { - parent::setUp(); - $this->subject = $this->getAccessibleMock(TypoScriptFrontendController::class, ['dummy'], [], '', false); - } - - /** - * Tests concerning domainNameMatchesCurrentRequest - */ - - /** - * @return array - */ - public function domainNameMatchesCurrentRequestDataProvider() - { - return [ - 'same domains' => [ - 'typo3.org', - 'typo3.org', - '/index.php', - true, - ], - 'same domains with subdomain' => [ - 'www.typo3.org', - 'www.typo3.org', - '/index.php', - true, - ], - 'different domains' => [ - 'foo.bar', - 'typo3.org', - '/index.php', - false, - ], - 'domain record with script name' => [ - 'typo3.org', - 'typo3.org/foo/bar', - '/foo/bar/index.php', - true, - ], - 'domain record with wrong script name' => [ - 'typo3.org', - 'typo3.org/foo/bar', - '/bar/foo/index.php', - false, - ], - ]; - } - - /** - * @param string $currentDomain - * @param string $domainRecord - * @param string $scriptName - * @param bool $expectedResult - * @test - * @dataProvider domainNameMatchesCurrentRequestDataProvider - */ - public function domainNameMatchesCurrentRequest($currentDomain, $domainRecord, $scriptName, $expectedResult) - { - $_SERVER['HTTP_HOST'] = $currentDomain; - $_SERVER['SCRIPT_NAME'] = $scriptName; - $this->assertEquals($expectedResult, $this->subject->domainNameMatchesCurrentRequest($domainRecord)); - } -} diff --git a/typo3/sysext/frontend/Tests/UnitDeprecated/Page/PageGeneratorTest.php b/typo3/sysext/frontend/Tests/UnitDeprecated/Page/PageGeneratorTest.php deleted file mode 100644 index 7853d9430631..000000000000 --- a/typo3/sysext/frontend/Tests/UnitDeprecated/Page/PageGeneratorTest.php +++ /dev/null @@ -1,366 +0,0 @@ -<?php -declare(strict_types = 1); -namespace TYPO3\CMS\Frontend\Tests\UnitDeprecated\Page; - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -use Prophecy\Argument; -use TYPO3\CMS\Core\Page\PageRenderer; -use TYPO3\CMS\Core\TypoScript\TemplateService; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; -use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController; -use TYPO3\CMS\Frontend\Page\PageGenerator; -use TYPO3\TestingFramework\Core\Unit\UnitTestCase; - -/** - * Test case - */ -class PageGeneratorTest extends UnitTestCase -{ - /** - * Tear down - */ - protected function tearDown() - { - GeneralUtility::purgeInstances(); - parent::tearDown(); - } - - /** - * @return array - */ - public function generateMetaTagHtmlGeneratesCorrectTagsDataProvider() - { - return [ - 'simple meta' => [ - [ - 'author' => 'Markus Klein', - ], - '', - [ - 'type' => 'name', - 'name' => 'author', - 'content' => 'Markus Klein' - ] - ], - 'httpEquivalent meta' => [ - [ - 'X-UA-Compatible' => 'IE=edge,chrome=1', - 'X-UA-Compatible.' => ['httpEquivalent' => 1] - ], - 'IE=edge,chrome=1', - [ - 'type' => 'http-equiv', - 'name' => 'X-UA-Compatible', - 'content' => 'IE=edge,chrome=1' - ] - ], - 'httpEquivalent meta xhtml new notation' => [ - [ - 'X-UA-Compatible' => 'IE=edge,chrome=1', - 'X-UA-Compatible.' => ['attribute' => 'http-equiv'] - ], - 'IE=edge,chrome=1', - [ - 'type' => 'http-equiv', - 'name' => 'X-UA-Compatible', - 'content' => 'IE=edge,chrome=1' - ] - ], - 'refresh meta' => [ - [ - 'refresh' => '10', - ], - '', - [ - 'type' => 'http-equiv', - 'name' => 'refresh', - 'content' => '10' - ] - ], - 'refresh meta new notation' => [ - [ - 'refresh' => '10', - 'refresh.' => ['attribute' => 'http-equiv'] - ], - '10', - [ - 'type' => 'http-equiv', - 'name' => 'refresh', - 'content' => '10' - ] - ], - 'meta with dot' => [ - [ - 'DC.author' => 'Markus Klein', - ], - '', - [ - 'type' => 'name', - 'name' => 'DC.author', - 'content' => 'Markus Klein' - ] - ], - 'meta with colon' => [ - [ - 'OG:title' => 'Magic Tests', - ], - '', - [ - 'type' => 'name', - 'name' => 'OG:title', - 'content' => 'Magic Tests' - ] - ], - 'different attribute name' => [ - [ - 'og:site_title' => 'My TYPO3 site', - 'og:site_title.' => ['attribute' => 'property'], - ], - 'My TYPO3 site', - [ - 'type' => 'property', - 'name' => 'og:site_title', - 'content' => 'My TYPO3 site' - ] - ], - 'meta with 0 value' => [ - [ - 'custom:key' => '0', - ], - '', - [ - 'type' => 'name', - 'name' => 'custom:key', - 'content' => '0' - ] - ], - ]; - } - - /** - * @test - */ - public function generateMetaTagExpectExceptionOnBogusTags() - { - $stdWrapResult = '10'; - - $typoScript = [ - 'refresh' => '10', - 'refresh.' => ['attribute' => 'http-equiv-new'] - ]; - - $expectedTags = [ - 'type' => 'http-equiv-new', - 'name' => 'refresh', - 'content' => '10' - ]; - - $cObj = $this->prophesize(ContentObjectRenderer::class); - $cObj->cObjGet(Argument::cetera())->shouldBeCalled(); - $cObj->stdWrap(Argument::cetera())->willReturn($stdWrapResult); - $tmpl = $this->prophesize(TemplateService::class); - $tsfe = $this->prophesize(TypoScriptFrontendController::class); - $tsfe->generatePageTitle()->willReturn(''); - $tsfe->INTincScript_loadJSCode()->shouldBeCalled(); - $tsfe->cObj = $cObj->reveal(); - $tsfe->tmpl = $tmpl->reveal(); - $tsfe->page = [ - 'title' => '' - ]; - $tsfe->pSetup = [ - 'meta.' => $typoScript - ]; - $GLOBALS['TSFE'] = $tsfe->reveal(); - - $pageRendererProphecy = $this->prophesize(PageRenderer::class); - GeneralUtility::setSingletonInstance(PageRenderer::class, $pageRendererProphecy->reveal()); - - PageGenerator::renderContentWithHeader(''); - - $pageRendererProphecy->setMetaTag($expectedTags['type'], $expectedTags['name'], $expectedTags['content'])->willThrow(\InvalidArgumentException::class); - } - - /** - * @test - * @dataProvider generateMetaTagHtmlGeneratesCorrectTagsDataProvider - * - * @param array $typoScript - * @param string $stdWrapResult - * @param array $expectedTags - */ - public function generateMetaTagHtmlGeneratesCorrectTags(array $typoScript, string $stdWrapResult, array $expectedTags) - { - $cObj = $this->prophesize(ContentObjectRenderer::class); - $cObj->cObjGet(Argument::cetera())->shouldBeCalled(); - $cObj->stdWrap(Argument::cetera())->willReturn($stdWrapResult); - $tmpl = $this->prophesize(TemplateService::class); - $tsfe = $this->prophesize(TypoScriptFrontendController::class); - $tsfe->generatePageTitle()->willReturn(''); - $tsfe->INTincScript_loadJSCode()->shouldBeCalled(); - $tsfe->cObj = $cObj->reveal(); - $tsfe->tmpl = $tmpl->reveal(); - $tsfe->config = [ - 'config' => [], - ]; - $tsfe->page = [ - 'title' => '' - ]; - $tsfe->pSetup = [ - 'meta.' => $typoScript - ]; - $GLOBALS['TSFE'] = $tsfe->reveal(); - - $pageRendererProphecy = $this->prophesize(PageRenderer::class); - GeneralUtility::setSingletonInstance(PageRenderer::class, $pageRendererProphecy->reveal()); - - PageGenerator::renderContentWithHeader(''); - - $pageRendererProphecy->setMetaTag($expectedTags['type'], $expectedTags['name'], $expectedTags['content'], [], false)->shouldHaveBeenCalled(); - } - - /** - * @test - */ - public function generateMetaTagHtmlGenerateNoTagWithEmptyContent() - { - $stdWrapResult = ''; - - $typoScript = [ - 'custom:key' => '', - ]; - - $cObj = $this->prophesize(ContentObjectRenderer::class); - $cObj->cObjGet(Argument::cetera())->shouldBeCalled(); - $cObj->stdWrap(Argument::cetera())->willReturn($stdWrapResult); - $tmpl = $this->prophesize(TemplateService::class); - $tsfe = $this->prophesize(TypoScriptFrontendController::class); - $tsfe->generatePageTitle()->willReturn(''); - $tsfe->INTincScript_loadJSCode()->shouldBeCalled(); - $tsfe->cObj = $cObj->reveal(); - $tsfe->tmpl = $tmpl->reveal(); - $tsfe->config = [ - 'config' => [], - ]; - $tsfe->page = [ - 'title' => '' - ]; - $tsfe->pSetup = [ - 'meta.' => $typoScript - ]; - $GLOBALS['TSFE'] = $tsfe->reveal(); - - $pageRendererProphecy = $this->prophesize(PageRenderer::class); - GeneralUtility::setSingletonInstance(PageRenderer::class, $pageRendererProphecy->reveal()); - - PageGenerator::renderContentWithHeader(''); - - $pageRendererProphecy->setMetaTag(null, null, null)->shouldNotBeCalled(); - } - - public function generateMultipleMetaTagsDataProvider() - { - return [ - 'multi value attribute name' => [ - [ - 'og:locale:alternate.' => [ - 'attribute' => 'property', - 'value' => [ - 10 => 'nl_NL', - 20 => 'de_DE', - ] - ], - ], - '', - [ - [ - 'type' => 'property', - 'name' => 'og:locale:alternate', - 'content' => 'nl_NL' - ], - [ - 'type' => 'property', - 'name' => 'og:locale:alternate', - 'content' => 'de_DE' - ] - ] - ], - 'multi value attribute name (empty values are skipped)' => [ - [ - 'og:locale:alternate.' => [ - 'attribute' => 'property', - 'value' => [ - 10 => 'nl_NL', - 20 => '', - 30 => 'de_DE', - ] - ], - ], - '', - [ - [ - 'type' => 'property', - 'name' => 'og:locale:alternate', - 'content' => 'nl_NL' - ], - [ - 'type' => 'property', - 'name' => 'og:locale:alternate', - 'content' => 'de_DE' - ] - ], - ], - ]; - } - - /** - * @test - * @dataProvider generateMultipleMetaTagsDataProvider - * - * @param array $typoScript - * @param string $stdWrapResult - * @param array $expectedTags - */ - public function generateMultipleMetaTags(array $typoScript, string $stdWrapResult, array $expectedTags) - { - $cObj = $this->prophesize(ContentObjectRenderer::class); - $cObj->cObjGet(Argument::cetera())->shouldBeCalled(); - $cObj->stdWrap(Argument::cetera())->willReturn($stdWrapResult); - $tmpl = $this->prophesize(TemplateService::class); - $tsfe = $this->prophesize(TypoScriptFrontendController::class); - $tsfe->generatePageTitle()->willReturn(''); - $tsfe->INTincScript_loadJSCode()->shouldBeCalled(); - $tsfe->cObj = $cObj->reveal(); - $tsfe->tmpl = $tmpl->reveal(); - $tsfe->config = [ - 'config' => [], - ]; - $tsfe->page = [ - 'title' => '' - ]; - $tsfe->pSetup = [ - 'meta.' => $typoScript - ]; - $GLOBALS['TSFE'] = $tsfe->reveal(); - - $pageRendererProphecy = $this->prophesize(PageRenderer::class); - GeneralUtility::setSingletonInstance(PageRenderer::class, $pageRendererProphecy->reveal()); - - PageGenerator::renderContentWithHeader(''); - - $pageRendererProphecy->setMetaTag($expectedTags[0]['type'], $expectedTags[0]['name'], $expectedTags[0]['content'], [], false)->shouldHaveBeenCalled(); - $pageRendererProphecy->setMetaTag($expectedTags[1]['type'], $expectedTags[1]['name'], $expectedTags[1]['content'], [], false)->shouldHaveBeenCalled(); - } -} diff --git a/typo3/sysext/indexed_search/Classes/Domain/Repository/AdministrationRepository.php b/typo3/sysext/indexed_search/Classes/Domain/Repository/AdministrationRepository.php index 582402372168..0b5b455ceab1 100644 --- a/typo3/sysext/indexed_search/Classes/Domain/Repository/AdministrationRepository.php +++ b/typo3/sysext/indexed_search/Classes/Domain/Repository/AdministrationRepository.php @@ -148,8 +148,6 @@ class AdministrationRepository 'cHashParams', 'data_filename', 'data_page_id', - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. Remove along with database field data_page_reg1 - 'data_page_reg1', 'data_page_type', 'data_page_mp', 'gr_list', @@ -334,8 +332,6 @@ class AdministrationRepository 'cHashParams', 'data_filename', 'data_page_id', - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. Remove along with database field data_page_reg1 - 'data_page_reg1', 'data_page_type', 'data_page_mp', 'gr_list', @@ -501,8 +497,6 @@ class AdministrationRepository 'IP.cHashParams', 'IP.data_filename', 'IP.data_page_id', - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. Remove along with database field data_page_reg1 - 'IP.data_page_reg1', 'IP.data_page_type', 'IP.data_page_mp', 'IP.gr_list', @@ -538,8 +532,6 @@ class AdministrationRepository 'IP.cHashParams', 'IP.data_filename', 'IP.data_page_id', - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. Remove along with database field data_page_reg1 - 'IP.data_page_reg1', 'IP.data_page_type', 'IP.data_page_mp', 'IP.gr_list', diff --git a/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php b/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php index 5873d486ed10..7de48953e9e6 100644 --- a/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php +++ b/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php @@ -541,8 +541,6 @@ class IndexSearchRepository 'IP.phash_grouping', 'IP.data_filename', 'IP.data_page_id', - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. Remove along with database field data_page_reg1 - 'IP.data_page_reg1', 'IP.data_page_type', 'IP.data_page_mp', 'IP.gr_list', @@ -1004,8 +1002,6 @@ class IndexSearchRepository 'IP.phash_grouping', 'IP.data_filename', 'IP.data_page_id', - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. Remove along with database field data_page_reg1 - 'IP.data_page_reg1', 'IP.data_page_type', 'IP.data_page_mp', 'IP.gr_list', diff --git a/typo3/sysext/indexed_search/Classes/Indexer.php b/typo3/sysext/indexed_search/Classes/Indexer.php index d64183827845..466eabce4112 100644 --- a/typo3/sysext/indexed_search/Classes/Indexer.php +++ b/typo3/sysext/indexed_search/Classes/Indexer.php @@ -309,10 +309,6 @@ class Indexer $this->conf['crdate'] = $pObj->page['crdate']; // The creation date of the TYPO3 page - // reg1 of the caching table. Not known what practical use this has. - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. Remove along with database field data_page_reg1 - $this->conf['page_cache_reg1'] = $pObj->page_cache_reg1; - // Root line uids $this->conf['rootline_uids'] = []; foreach ($pObj->config['rootLine'] as $rlkey => $rldat) { @@ -402,9 +398,6 @@ class Indexer $this->conf['freeIndexUid'] = 0; $this->conf['freeIndexSetId'] = 0; - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. Remove along with database field data_page_reg1 - $this->conf['page_cache_reg1'] = 0; - // Root line uids $this->conf['rootline_uids'] = $uidRL; // Configuration of behavior: @@ -1462,8 +1455,6 @@ class Indexer 'cHashParams' => serialize($this->cHashParams), 'contentHash' => $this->content_md5h, 'data_page_id' => $this->conf['id'], - // @deprecated since TYPO3 v9, will be removed in TYPO3 v10.0. Remove along with database field data_page_reg1 - 'data_page_reg1' => $this->conf['page_cache_reg1'], 'data_page_type' => $this->conf['type'], 'data_page_mp' => $this->conf['MP'], 'gr_list' => $this->conf['gr_list'], diff --git a/typo3/sysext/indexed_search/ext_tables.sql b/typo3/sysext/indexed_search/ext_tables.sql index 79e5b20c2f81..676da10c9cad 100644 --- a/typo3/sysext/indexed_search/ext_tables.sql +++ b/typo3/sysext/indexed_search/ext_tables.sql @@ -8,7 +8,6 @@ CREATE TABLE index_phash ( cHashParams blob, data_filename varchar(1024) DEFAULT '' NOT NULL, data_page_id int(11) unsigned DEFAULT '0' NOT NULL, - data_page_reg1 int(11) unsigned DEFAULT '0' NOT NULL, data_page_type int(11) unsigned DEFAULT '0' NOT NULL, data_page_mp varchar(255) DEFAULT '' NOT NULL, gr_list varchar(255) DEFAULT '' NOT NULL, diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php index 4265d5a42190..f7de1441c53a 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php @@ -712,11 +712,13 @@ return [ 'TYPO3\CMS\Frontend\Page\ExternalPageUrlHandler' => [ 'restFiles' => [ 'Deprecation-85124-RedirectingUrlHandlerHookConcept.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Http\UrlHandlerInterface' => [ 'restFiles' => [ 'Deprecation-85124-RedirectingUrlHandlerHookConcept.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Core\Log\Writer\RuntimeCacheWriter' => [ @@ -1009,4 +1011,19 @@ return [ 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], + 'TYPO3\CMS\Core\PageTitle\AltPageTitleProvider' => [ + 'restFiles' => [ + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', + ], + ], + 'TYPO3\CMS\Frontend\Page\PageGenerator' => [ + 'restFiles' => [ + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', + ], + ], + 'TYPO3\CMS\Frontend\Utility\EidUtility' => [ + 'restFiles' => [ + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', + ], + ], ]; diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodArgumentRequiredMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodArgumentRequiredMatcher.php index 106720be1634..175533bedc8d 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodArgumentRequiredMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodArgumentRequiredMatcher.php @@ -19,14 +19,16 @@ return [ 'numberOfMandatoryArguments' => 1, 'maximumNumberOfArguments' => 1, 'restFiles' => [ - 'Deprecation-86046-AdditionalArgumentsInSeveralTypoScriptFrontendControllerMethods.rst' + 'Deprecation-86046-AdditionalArgumentsInSeveralTypoScriptFrontendControllerMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->preparePageContentGeneration' => [ 'numberOfMandatoryArguments' => 1, 'maximumNumberOfArguments' => 1, 'restFiles' => [ - 'Deprecation-86046-AdditionalArgumentsInSeveralTypoScriptFrontendControllerMethods.rst' + 'Deprecation-86046-AdditionalArgumentsInSeveralTypoScriptFrontendControllerMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], ]; diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodArgumentUnusedMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodArgumentUnusedMatcher.php index ae76a1658d8e..c856d78bbb21 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodArgumentUnusedMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodArgumentUnusedMatcher.php @@ -37,6 +37,7 @@ return [ 'unusedArgumentNumbers' => [ 4 ], 'restFiles' => [ 'Deprecation-86002-TSFEConstructorWithNo_cacheArgument.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], ]; diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php index 26b205cdbb32..995a2db80d53 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php @@ -1483,6 +1483,7 @@ return [ 'maximumNumberOfArguments' => 1, 'restFiles' => [ 'Deprecation-81217-TSFE-relatedLanguageMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->getLLL' => [ @@ -1490,6 +1491,7 @@ return [ 'maximumNumberOfArguments' => 2, 'restFiles' => [ 'Deprecation-81217-TSFE-relatedLanguageMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->initLLvars' => [ @@ -1497,6 +1499,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-81217-TSFE-relatedLanguageMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Core\Page\PageRenderer->addMetaTag' => [ @@ -1589,6 +1592,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-82926-DomainRelatedApiMethodInTSFE.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider->getTranslationTable' => [ @@ -1766,6 +1770,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-83883-PageNotFoundAndErrorHandlingInFrontend.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pageNotFoundAndExit' => [ @@ -1773,6 +1778,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-83883-PageNotFoundAndErrorHandlingInFrontend.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->checkPageUnavailableHandler' => [ @@ -1780,6 +1786,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-83883-PageNotFoundAndErrorHandlingInFrontend.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pageUnavailableHandler' => [ @@ -1787,6 +1794,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-83883-PageNotFoundAndErrorHandlingInFrontend.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pageNotFoundHandler' => [ @@ -1794,6 +1802,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-83883-PageNotFoundAndErrorHandlingInFrontend.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pageErrorHandler' => [ @@ -1801,6 +1810,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-83883-PageNotFoundAndErrorHandlingInFrontend.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Backend\Tree\View\AbstractTreeView->setDataFromArray' => [ @@ -2351,6 +2361,7 @@ return [ 'maximumNumberOfArguments' => 1, 'restFiles' => [ 'Deprecation-84725-SysDomainResolvingMovedIntoMiddleware.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Page\PageRepository->getDomainStartPage' => [ @@ -2366,6 +2377,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-84965-VariousTypoScriptFrontendControllerMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->checkAlternativeIdMethods' => [ @@ -2373,6 +2385,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-84965-VariousTypoScriptFrontendControllerMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->initializeBackendUser' => [ @@ -2380,6 +2393,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-84965-VariousTypoScriptFrontendControllerMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->handleDataSubmission' => [ @@ -2387,6 +2401,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-84965-VariousTypoScriptFrontendControllerMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->setCSS' => [ @@ -2394,6 +2409,7 @@ return [ 'maximumNumberOfArguments' => 2, 'restFiles' => [ 'Deprecation-84965-VariousTypoScriptFrontendControllerMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->convPOSTCharset' => [ @@ -2401,6 +2417,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-84965-VariousTypoScriptFrontendControllerMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Core\Authentication\BackendUserAuthentication->addTScomment' => [ @@ -2685,6 +2702,7 @@ return [ 'maximumNumberOfArguments' => 1, 'restFiles' => [ 'Deprecation-85555-TypoScriptFrontendController-getUniqueId.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->enableFields' => [ @@ -2736,6 +2754,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-85666-TypoScriptFrontendController-initTemplate.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Adminpanel\View\AdminPanelView->isAdminModuleEnabled' => [ @@ -3179,6 +3198,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-85878-EidUtilityAndVariousTSFEMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->sendCacheHeaders' => [ @@ -3186,6 +3206,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-85878-EidUtilityAndVariousTSFEMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->storeSessionData' => [ @@ -3193,6 +3214,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-85878-EidUtilityAndVariousTSFEMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->hook_eofe' => [ @@ -3200,6 +3222,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-85878-EidUtilityAndVariousTSFEMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->previewInfo' => [ @@ -3207,6 +3230,7 @@ return [ 'maximumNumberOfArguments' => 1, 'restFiles' => [ 'Deprecation-85878-EidUtilityAndVariousTSFEMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->addTempContentHttpHeaders' => [ @@ -3214,6 +3238,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-85878-EidUtilityAndVariousTSFEMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->domainNameMatchesCurrentRequest' => [ @@ -3221,6 +3246,7 @@ return [ 'maximumNumberOfArguments' => 1, 'restFiles' => [ 'Deprecation-85892-VariousMethodsRegardingSysDomainResolving.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->getDomainDataForPid' => [ @@ -3228,6 +3254,7 @@ return [ 'maximumNumberOfArguments' => 1, 'restFiles' => [ 'Deprecation-85892-VariousMethodsRegardingSysDomainResolving.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Backend\Controller\PageLayoutController->getLocalizedPageTitle' => [ @@ -3425,6 +3452,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-86047-TSFEPropertiesMethodsAndChangeVisibility.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->realPageCacheContent' => [ @@ -3432,6 +3460,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-86047-TSFEPropertiesMethodsAndChangeVisibility.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->setPageCacheContent' => [ @@ -3439,6 +3468,7 @@ return [ 'maximumNumberOfArguments' => 3, 'restFiles' => [ 'Deprecation-86047-TSFEPropertiesMethodsAndChangeVisibility.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->clearPageCacheContent_pidList' => [ @@ -3446,6 +3476,7 @@ return [ 'maximumNumberOfArguments' => 1, 'restFiles' => [ 'Deprecation-86047-TSFEPropertiesMethodsAndChangeVisibility.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->setSysLastChanged' => [ @@ -3453,6 +3484,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-86047-TSFEPropertiesMethodsAndChangeVisibility.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->contentStrReplace' => [ @@ -3460,6 +3492,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-86047-TSFEPropertiesMethodsAndChangeVisibility.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Extbase\Core\Bootstrap->configureObjectManager' => [ @@ -3583,6 +3616,7 @@ return [ 'maximumNumberOfArguments' => 1, 'restFiles' => [ 'Deprecation-86389-GeneralUtility_GETsetAndTSFE-mergingWithGetVars.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Core\DataHandling\DataHandler->checkValue_group_select_file' => [ @@ -3631,7 +3665,8 @@ return [ 'numberOfMandatoryArguments' => 0, 'maximumNumberOfArguments' => 0, 'restFiles' => [ - 'Deprecation-86411-TSFE-makeCacheHash.rst' + 'Deprecation-86411-TSFE-makeCacheHash.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap_addParams' => [ @@ -3904,7 +3939,8 @@ return [ 'numberOfMandatoryArguments' => 0, 'maximumNumberOfArguments' => 0, 'restFiles' => [ - 'Deprecation-86486-TypoScriptFrontendController-processOutput.rst' + 'Deprecation-86486-TypoScriptFrontendController-processOutput.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst' ], ], ]; diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php index 17c291ce8650..6d689d7006f5 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php @@ -413,6 +413,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-81201-EidUtilityinitTCA.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Backend\Utility\BackendUtility::getListGroupNames' => [ @@ -791,6 +792,7 @@ return [ 'maximumNumberOfArguments' => 1, 'restFiles' => [ 'Deprecation-85878-EidUtilityAndVariousTSFEMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Utility\EidUtility::initFeUser' => [ @@ -798,6 +800,7 @@ return [ 'maximumNumberOfArguments' => 0, 'restFiles' => [ 'Deprecation-85878-EidUtilityAndVariousTSFEMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Utility\EidUtility::initExtensionTCA' => [ @@ -805,6 +808,7 @@ return [ 'maximumNumberOfArguments' => 1, 'restFiles' => [ 'Deprecation-85878-EidUtilityAndVariousTSFEMethods.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Backend\Utility\BackendUtility::getDomainStartPage' => [ diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyProtectedMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyProtectedMatcher.php index 37f59a3a7631..f295b5479e57 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyProtectedMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyProtectedMatcher.php @@ -859,86 +859,103 @@ return [ 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->ADMCMD_preview_BEUSER_uid' => [ 'restFiles' => [ 'Deprecation-86047-TSFEPropertiesMethodsAndChangeVisibility.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->workspacePreview' => [ 'restFiles' => [ 'Deprecation-86047-TSFEPropertiesMethodsAndChangeVisibility.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->loginAllowedInBranch' => [ 'restFiles' => [ 'Deprecation-86047-TSFEPropertiesMethodsAndChangeVisibility.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->MP_defaults' => [ 'restFiles' => [ 'Deprecation-86047-TSFEPropertiesMethodsAndChangeVisibility.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->debug' => [ 'restFiles' => [ 'Deprecation-86047-TSFEPropertiesMethodsAndChangeVisibility.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pageAccessFailureHistory' => [ 'restFiles' => [ 'Deprecation-86047-TSFEPropertiesMethodsAndChangeVisibility.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->loginAllowedInBranch_mode' => [ 'restFiles' => [ 'Deprecation-86320-MarkInternalTSFEPropertiesAsProtected.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->cacheTimeOutDefault' => [ 'restFiles' => [ 'Deprecation-86320-MarkInternalTSFEPropertiesAsProtected.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->cacheContentFlag' => [ 'restFiles' => [ 'Deprecation-86320-MarkInternalTSFEPropertiesAsProtected.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->isClientCachable' => [ 'restFiles' => [ 'Deprecation-86320-MarkInternalTSFEPropertiesAsProtected.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->no_cacheBeforePageGen' => [ 'restFiles' => [ 'Deprecation-86320-MarkInternalTSFEPropertiesAsProtected.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->tempContent' => [ 'restFiles' => [ 'Deprecation-86320-MarkInternalTSFEPropertiesAsProtected.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->pagesTSconfig' => [ 'restFiles' => [ 'Deprecation-86320-MarkInternalTSFEPropertiesAsProtected.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->uniqueCounter' => [ 'restFiles' => [ 'Deprecation-86320-MarkInternalTSFEPropertiesAsProtected.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->uniqueString' => [ 'restFiles' => [ 'Deprecation-86320-MarkInternalTSFEPropertiesAsProtected.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->lang' => [ 'restFiles' => [ 'Deprecation-86320-MarkInternalTSFEPropertiesAsProtected.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->cacheExpires' => [ 'restFiles' => [ 'Deprecation-86320-MarkInternalTSFEPropertiesAsProtected.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Core\Html\RteHtmlParser->blockElementList' => [ diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php index 1f8d508fc680..1a4dd6a7012f 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php @@ -341,6 +341,7 @@ return [ 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->page_cache_reg1' => [ 'restFiles' => [ 'Deprecation-83905-TypoScriptFrontendController-page_cache_reg1.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ] ], 'TYPO3\CMS\Backend\Tree\View\AbstractTreeView->dataLookup' => [ @@ -412,47 +413,56 @@ return [ ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->showHiddenPage' => [ 'restFiles' => [ - 'Deprecation-85389-VariousPublicPropertiesInFavorOfContextAPI.rst' + 'Deprecation-85389-VariousPublicPropertiesInFavorOfContextAPI.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->showHiddenRecords' => [ 'restFiles' => [ - 'Deprecation-85389-VariousPublicPropertiesInFavorOfContextAPI.rst' + 'Deprecation-85389-VariousPublicPropertiesInFavorOfContextAPI.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->gr_list' => [ 'restFiles' => [ - 'Deprecation-85389-VariousPublicPropertiesInFavorOfContextAPI.rst' + 'Deprecation-85389-VariousPublicPropertiesInFavorOfContextAPI.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->loginUser' => [ 'restFiles' => [ - 'Deprecation-85389-VariousPublicPropertiesInFavorOfContextAPI.rst' + 'Deprecation-85389-VariousPublicPropertiesInFavorOfContextAPI.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->beUserLogin' => [ 'restFiles' => [ - 'Deprecation-85389-VariousPublicPropertiesInFavorOfContextAPI.rst' + 'Deprecation-85389-VariousPublicPropertiesInFavorOfContextAPI.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->sys_language_uid' => [ 'restFiles' => [ - 'Deprecation-85543-Language-relatedPropertiesInTypoScriptFrontendControllerAndPageRepository.rst' + 'Deprecation-85543-Language-relatedPropertiesInTypoScriptFrontendControllerAndPageRepository.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->sys_language_content' => [ 'restFiles' => [ - 'Deprecation-85543-Language-relatedPropertiesInTypoScriptFrontendControllerAndPageRepository.rst' + 'Deprecation-85543-Language-relatedPropertiesInTypoScriptFrontendControllerAndPageRepository.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->sys_language_contentOL' => [ 'restFiles' => [ - 'Deprecation-85543-Language-relatedPropertiesInTypoScriptFrontendControllerAndPageRepository.rst' + 'Deprecation-85543-Language-relatedPropertiesInTypoScriptFrontendControllerAndPageRepository.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->sys_language_mode' => [ 'restFiles' => [ - 'Deprecation-85543-Language-relatedPropertiesInTypoScriptFrontendControllerAndPageRepository.rst' + 'Deprecation-85543-Language-relatedPropertiesInTypoScriptFrontendControllerAndPageRepository.rst', + 'Breaking-87193-DeprecatedFunctionalityRemoved.rst', ], ], 'TYPO3\CMS\Frontend\Page\PageRepository->sys_language_uid' => [ diff --git a/typo3/sysext/t3editor/Resources/Private/tsref.xml b/typo3/sysext/t3editor/Resources/Private/tsref.xml index 13c124f2768d..50c939a1a630 100644 --- a/typo3/sysext/t3editor/Resources/Private/tsref.xml +++ b/typo3/sysext/t3editor/Resources/Private/tsref.xml @@ -188,16 +188,6 @@ The result is used just like MP_defaults are used to find MP-vars if none has be You can specify "root" as a special keyword in the list of IDs and that will create a map-tree for the whole site (but this may be VERY processing intensive if there are many pages!). The order of IDs specified may have a significance; Any ID in a branch which is processed already (by a previous ID root point) will not be processed again.]]></description> <default><![CDATA[ -]]></default> - </property> - <property name="USERNAME_substToken" type="string"> - <description><![CDATA[The is the token used on the page, which should be substituted with the current username IF a front-end user is logged in! If no login, the substitution will not happen.]]></description> - <default><![CDATA[<!--###USERNAME###-->]]></default> - </property> - <property name="USERUID_substToken" type="string"> - <description><![CDATA[The is the token used on the page, which should be substituted with the current users UID IF a front-end user is logged in! If no login, the substitution will not happen. -This value has no default value and only if you specify a value for this token will a substitution process take place.]]></description> - <default><![CDATA[ ]]></default> </property> <property name="absRefPrefix" type="string"> @@ -810,12 +800,6 @@ hideNonTranslated : If this keyword is used a record that has no translation wil Internally, the value is depending on whether a Alternative Page Language record can be found with that language. If not, the value will default to zero (default language) except if "sys_language_mode" is set to a value like "content_fallback".]]></description> <default><![CDATA[ -]]></default> - </property> - <property name="titleTagFunction " type="string"> - <description><![CDATA[function-name - Passes the default <title>-tag content to this function. No typoScript parameters are passed though.]]></description> - <default><![CDATA[ ]]></default> </property> <property name="typolinkEnableLinksAcrossDomains" type="boolean"> @@ -2957,15 +2941,6 @@ You can set the ITEM_STATE values USERDEF1 and USERDEF2 (+...RO) from a script/u Enable/Configuration for menu items which are access restricted pages that a user has access to.]]></description> <default><![CDATA[0]]></default> </property> - <property name="addParams" type="string"> - <description><![CDATA[Additional parameter for the menu-links. -Example: -"&some_var=some%20value" -Must be rawurlencoded. -Applies to GMENU, TMENU, IMGMENU]]></description> - <default><![CDATA[ -]]></default> - </property> <property name="IProcFunc" type="string"> <description><![CDATA[The internal array "I" is passed to this function and expected returned as well. Subsequent to this function call the menu item is compiled by implode()'ing the array $I[parts] in the passed array. Thus you may modify this if you need to. See example on the testsite and in media/scripts/example_itemArrayProcFunc.php]]></description> @@ -3322,15 +3297,6 @@ You can set the ITEM_STATE values USERDEF1 and USERDEF2 (+...RO) from a script/u Enable/Configuration for menu items which are access restricted pages that a user has access to.]]></description> <default><![CDATA[0]]></default> </property> - <property name="addParams" type="string"> - <description><![CDATA[Additional parameter for the menu-links. -Example: -"&some_var=some%20value" -Must be rawurlencoded. -Applies to GMENU, TMENU, IMGMENU]]></description> - <default><![CDATA[ -]]></default> - </property> <property name="dWorkArea" type="string"> <description><![CDATA[offset + calc Main offset of the GIFBUILDER-items (also called the "distribution")]]></description> @@ -3667,15 +3633,6 @@ You can set the ITEM_STATE values USERDEF1 and USERDEF2 (+...RO) from a script/u Enable/Configuration for menu items which are access restricted pages that a user has access to.]]></description> <default><![CDATA[0]]></default> </property> - <property name="addParams" type="string"> - <description><![CDATA[Additional parameter for the menu-links. -Example: -"&some_var=some%20value" -Must be rawurlencoded. -Applies to GMENU, TMENU, IMGMENU]]></description> - <default><![CDATA[ -]]></default> - </property> <property name="IProcFunc" type="string"> <description><![CDATA[function-name The internal array "I" is passed to this function and expected returned as well. Subsequent to this function call the menu item is compiled by implode()'ing the array $I[parts] in the passed array. Thus you may modify this if you need to. @@ -5199,22 +5156,6 @@ In the GIFBUILDER object this is possible with the "splitRendering" option but i ]]></default> </property> </type> - <type id="addParams" extends="array"> - <property name="[myTagProperty]" type="stdWrap"> - <description><![CDATA[This defines the content of each added property to the tag. -If there is a tag-property with this name already (case-sensitive!) that property will be overridden! -If the returned value is a blank string (but not zero!) then the existing (if any) property will not be overridden. -Example: -img.addParams.border = 0]]></description> - <default><![CDATA[ -]]></default> - </property> - <property name="_offset" type="int"> - <description><![CDATA[Use this to define which tag you want to manipulate. -1 is the first tag in the input, 2 is the second, -1 is the last, -2 is the second last]]></description> - <default><![CDATA[1]]></default> - </property> - </type> <type id="CONSTANTS"> <property name="[myConstant]" type="string"> <description><![CDATA[Constants. @@ -6185,11 +6126,6 @@ This object allows you to parse the HTML-content and make all kinds of advanced Value must be set and properties are those of ->HTMLparser. (See adminguide for ->HTMLparser options)]]></description> <default><![CDATA[ -]]></default> - </property> - <property name="addParams" type="addParams"> - <description><![CDATA[Lets you add tag-parameters to the content if the content is a tag!]]></description> - <default><![CDATA[ ]]></default> </property> <property name="age" type="string"> @@ -6378,22 +6314,6 @@ Note: You can also divide fieldnames by "//". Say, you set "nav_title // title" <property name="fieldRequired" type="string"> <description><![CDATA[value in this field MUST be set]]></description> <default><![CDATA[ -]]></default> - </property> - <property name="filelink" type="filelink"> - <description><![CDATA[Used to make lists of links to files.]]></description> - <default><![CDATA[ -]]></default> - </property> - <property name="filelist" type="stdWrap"> - <description><![CDATA[Reads a directory and returns a list of files. -The value is exploded by "|" into parameters: -1: The path -2: comma-list of allowed extensions (no spaces between); if empty all extensions goes. -3: sorting: name, size, ext, date, mdate (modification date) -4: reverse: Set to "r" if you want a reversed sorting -5: fullpath_flag: If set, the filelist is returned with complete paths, and not just the filename]]></description> - <default><![CDATA[ ]]></default> </property> <property name="hash" type="stdWrap"> diff --git a/typo3/sysext/t3editor/Resources/Public/JavaScript/Mode/typoscript/typoscript.js b/typo3/sysext/t3editor/Resources/Public/JavaScript/Mode/typoscript/typoscript.js index 382b3a06a4ef..591421f0a89f 100644 --- a/typo3/sysext/t3editor/Resources/Public/JavaScript/Mode/typoscript/typoscript.js +++ b/typo3/sysext/t3editor/Resources/Public/JavaScript/Mode/typoscript/typoscript.js @@ -45,7 +45,6 @@ 'addItems': kw('addItems'), 'additionalHeaders': kw('additionalHeaders'), 'additionalParams': kw('additionalParams'), - 'addParams': kw('addParams'), 'addQueryString': kw('addQueryString'), 'adjustItemsH': kw('adjustItemsH'), 'adjustSubItemsH': kw('adjustSubItemsH'), @@ -352,8 +351,6 @@ 'file3': kw('file3'), 'file4': kw('file4'), 'file5': kw('file5'), - 'filelink': kw('filelink'), - 'filelist': kw('filelist'), 'FILES': kw('FILES'), 'files': kw('files'), 'firstLabel': kw('firstLabel'), @@ -873,7 +870,6 @@ 'tipafriendLib': kw('tipafriendLib'), 'title': kw('title'), 'titleLen': kw('titleLen'), - 'titleTagFunction': kw('titleTagFunction'), 'titleText': kw('titleText'), 'tm': kw('tm'), 'TMENU': kw('TMENU'), @@ -921,7 +917,6 @@ 'userfunction': kw('userfunction'), 'usergroup': B, 'userid': kw('userid'), - 'USERNAME_substToken': kw('USERNAME_substToken'), 'userProc': kw('userProc'), 'USR': B, 'USRRO': B, -- GitLab