Skip to content

Commit

Permalink
[!!!][TASK] Remove deprecated code from TypoScriptParser
Browse files Browse the repository at this point in the history
Resolves: #87459
Releases: master
Change-Id: Iae4bd1efc937b225437d49857674276e18d5422c
Reviewed-on: https://review.typo3.org/59456
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
  • Loading branch information
lolli42 authored and maddy2101 committed Jan 17, 2019
1 parent fadaa10 commit a8e83ac
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 66 deletions.
43 changes: 0 additions & 43 deletions typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
use Psr\Log\LoggerInterface;
use Symfony\Component\Finder\Finder;
use TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher as BackendConditionMatcher;
use TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait;
use TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait;
use TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Log\LogManager;
Expand All @@ -35,37 +33,6 @@
*/
class TypoScriptParser
{
use PublicPropertyDeprecationTrait;
use PublicMethodDeprecationTrait;

protected $deprecatedPublicProperties = [
'raw' => 'Using $raw of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'rawP' => 'Using $rawP of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'lastComment' => 'Using $lastComment of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'commentSet' => 'Using $commentSet of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'multiLineEnabled' => 'Using $multiLineEnabled of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'multiLineObject' => 'Using $multiLineObject of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'multiLineValue' => 'Using $multiLineValue of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'inBrace' => 'Using $inBrace of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'lastConditionTrue' => 'Using $lastConditionTrue of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'syntaxHighLight' => 'Using $syntaxHighLight of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'highLightData' => 'Using $highLightData of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'highLightData_bracelevel' => 'Using $highLightData_bracelevel of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'highLightStyles' => 'Using $highLightStyles of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'highLightBlockStyles' => 'Using $highLightBlockStyles of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'highLightBlockStyles_basecolor' => 'Using $highLightBlockStyles_basecolor of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
];

protected $deprecatedPublicMethods = [
'nextDivider' => 'Using nextDivider() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
'parseSub' => 'Using parseSub() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
'rollParseSub' => 'Using rollParseSub() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
'setVal' => 'Using setVal() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
'error' => 'Using error() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
'regHighLight' => 'Using regHighLight() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
'syntaxHighlight_print' => 'Using syntaxHighlight_print() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
];

/**
* TypoScript hierarchy being build during parsing.
*
Expand Down Expand Up @@ -1133,16 +1100,6 @@ public static function includeFile($filename, $cycle_counter = 1, $returnFiles =
$fileExists = false;
if (@file_exists($absfilename)) {
$fileExists = true;
} else {
// BC layer after renaming core TypoScript files from .txt to .typoscript
if (substr($absfilename, -4, 4) === '.txt') {
$absfilename = substr($absfilename, 0, -4) . '.typoscript';
if (@file_exists($absfilename)) {
trigger_error('The TypoScript file ' . $filename . ' was renamed to .typoscript extension.'
. ' Update your "<INCLUDE_TYPOSCRIPT" statements.', E_USER_DEPRECATED);
$fileExists = true;
}
}
}

if ($fileExists) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,13 @@ 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\Beuser\Controller\BackendUserController->initializeView()` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->error()` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->nextDivider()` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->parseSub()` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->regHighLight()` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->rollParseSub()` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->setVal()` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->syntaxHighlight_print()` changed from public to protected
* :php:`TYPO3\CMS\Filelist\Controller\FileListController->menuConfig()` changed from public to protected
* :php:`TYPO3\CMS\Filelist\Controller\FileListController->initializeView()` changed from public to protected
* :php:`TYPO3\CMS\Filelist\Controller\FileListController->initializeIndexAction()` changed from public to protected
Expand Down Expand Up @@ -998,6 +1004,21 @@ 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\Core\TypoScript\Parser\TypoScriptParser->commentSet` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->highLightBlockStyles` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->highLightBlockStyles_basecolor` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->highLightData` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->highLightData_bracelevel` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->highLightStyles` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->inBrace` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->lastComment` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->lastConditionTrue` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->multiLineEnabled` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->multiLineObject` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->multiLineValue` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->raw` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->rawP` changed from public to protected
* :php:`TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->syntaxHighLight` changed from public to protected
* :php:`TYPO3\CMS\Filelist\Controller\FileListController->MOD_MENU` changed from public to protected
* :php:`TYPO3\CMS\Filelist\Controller\FileListController->MOD_SETTINGS` changed from public to protected
* :php:`TYPO3\CMS\Filelist\Controller\FileListController->doc` changed from public to protected
Expand Down Expand Up @@ -1299,6 +1320,7 @@ The following features have been removed:
* All install tool upgrade wizards upgrading from v7 to v8 have been removed
* The array key :php:`uploadfolder` in extensions :php:`ext_emconf.php` files is obsolete and ignored.
* Standalone install tool entry point :file:`typo3/install/index.php` has been dropped, use :file:`typo3/install.php` instead
* INCLUDE_TYPOSCRIPT statements in typoscript using a `.txt` ending for a file that ends with `.typoscript` does not work any longer


The following database tables have been removed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4040,49 +4040,56 @@
'numberOfMandatoryArguments' => 0,
'maximumNumberOfArguments' => 0,
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->parseSub' => [
'numberOfMandatoryArguments' => 1,
'maximumNumberOfArguments' => 1,
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst'
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->rollParseSub' => [
'numberOfMandatoryArguments' => 2,
'maximumNumberOfArguments' => 2,
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->setVal' => [
'numberOfMandatoryArguments' => 3,
'maximumNumberOfArguments' => 4,
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->error' => [
'numberOfMandatoryArguments' => 1,
'maximumNumberOfArguments' => 2,
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->regHighLight' => [
'numberOfMandatoryArguments' => 2,
'maximumNumberOfArguments' => 3,
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->syntaxHighlight_print' => [
'numberOfMandatoryArguments' => 2,
'maximumNumberOfArguments' => 2,
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\Resource\ResourceStorage->dumpFileContents' => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1153,77 +1153,92 @@
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->raw' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->rawP' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->lastComment' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->commentSet' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->multiLineEnabled' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->multiLineObject' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->multiLineValue' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->inBrace' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->lastConditionTrue' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->syntaxHighLight' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->highLightData' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->highLightData_bracelevel' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->highLightStyles' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->highLightBlockStyles' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser->highLightBlockStyles_basecolor' => [
'restFiles' => [
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst'
'Deprecation-86461-MarkVariousTypoScriptParsingFunctionalityAsInternal.rst',
'Breaking-87193-DeprecatedFunctionalityRemoved.rst',
],
],
];

0 comments on commit a8e83ac

Please sign in to comment.