diff --git a/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php b/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php index ee920bf957164bfd2394948dfe97abb08d38460f..5ea0f7072bcfd0805f27a67d54eaa8b4dffbbf3a 100644 --- a/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php +++ b/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php @@ -33,14 +33,6 @@ use TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatch */ class ExtendedTemplateService extends TemplateService { - /** - * This string is used to indicate the point in a template from where the editable constants are listed. - * Any vars before this point (if it exists though) is regarded as default values. - * - * @var string - */ - public $edit_divider = '###MOD_TS:EDITABLE_CONSTANTS###'; - /** * Disabled in backend context * @@ -320,7 +312,7 @@ class ExtendedTemplateService extends TemplateService /** * Parse constants with respect to the constant-editor in this module. - * In particular comments in the code are registered and the edit_divider is taken into account. + * In particular comments in the code are registered. * * @return array */ @@ -343,11 +335,6 @@ class ExtendedTemplateService extends TemplateService foreach ($this->constants as $str) { $c++; if ($c == $cc) { - if (strstr($str, $this->edit_divider)) { - $parts = explode($this->edit_divider, $str, 2); - $str = $parts[1]; - $constants->parse($parts[0], $matchObj); - } $this->flatSetup = []; $this->flattenSetup($constants->setup, ''); $defaultConstants = $this->flatSetup; @@ -1354,10 +1341,6 @@ class ExtendedTemplateService extends TemplateService // Works with regObjectPositions. "expands" the names of the TypoScript objects while (isset($this->raw[$this->rawP])) { $line = ltrim($this->raw[$this->rawP]); - if (strstr($line, $this->edit_divider)) { - // Resetting the objReg if the divider is found!! - $this->objReg = []; - } $this->rawP++; if ($line) { if ($line[0] === '[') { diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-82425-RemoveOldTyposcriptConstantsEditorOptionMOD_TSEDITABLE_CONSTANTS.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-82425-RemoveOldTyposcriptConstantsEditorOptionMOD_TSEDITABLE_CONSTANTS.rst new file mode 100644 index 0000000000000000000000000000000000000000..ce40a997fba49b3fb729e8660d65592ab5ca7749 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-82425-RemoveOldTyposcriptConstantsEditorOptionMOD_TSEDITABLE_CONSTANTS.rst @@ -0,0 +1,32 @@ +.. include:: ../../Includes.txt + +================================================================================================== +Breaking: #82425 - Remove old typoscript constants editor option "###MOD_TS:EDITABLE_CONSTANTS###" +================================================================================================== + +See :issue:`82425` + +Description +=========== + +The special functionality on the constant comment `###MOD_TS:EDITABLE_CONSTANTS###` +has been dropped. This rarely used feature makes this comment a casual +comment without further added features. + +A public property of PHP class has been dropped together with that removal: + +* Property :php:`TYPO3\CMS\Core\TypoScript\ExtendedTemplateService->edit_divider` + + +Impact +====== + +The constants editor does not show constants before the comment `###MOD_TS:EDITABLE_CONSTANTS###` anymore as default constants. + + +Affected Installations +====================== + +All installations which have configured the constants comment `###MOD_TS:EDITABLE_CONSTANTS###`. Since this has been a widely unknown feature, most instances should not be affected. + +.. index:: Backend, TypoScript, PartiallyScanned diff --git a/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php b/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php index 15010cd287327150130f98baa2fb524f29f56c8f..b32b4e8800038e3f3a869b74aa9edcae74b03f4b 100644 --- a/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php +++ b/typo3/sysext/install/Configuration/ExtensionScanner/Php/PropertyPublicMatcher.php @@ -184,6 +184,11 @@ return [ 'Breaking-82398-RemoveSpecialConstantTSConstantEditor.rst', ], ], + 'TYPO3\CMS\Core\TypoScript\ExtendedTemplateService->edit_divider' => [ + 'restFiles' => [ + 'Breaking-82425-RemoveOldTyposcriptConstantsEditorOptionMOD_TSEDITABLE_CONSTANTS.rst', + ], + ], // Deprecated public properties ]; diff --git a/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateConstantEditorModuleFunctionController.php b/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateConstantEditorModuleFunctionController.php index 4de03c7e5b8c90ac3b4d1ea86191fe82148b01ca..9ed409fb9bc367fffb52a5387bcca00eb436e89b 100644 --- a/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateConstantEditorModuleFunctionController.php +++ b/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateConstantEditorModuleFunctionController.php @@ -76,7 +76,7 @@ class TypoScriptTemplateConstantEditorModuleFunctionController extends AbstractF $this->constants = $this->templateService->generateConfig_constants(); // The returned constants are sorted in categories, that goes into the $tmpl->categories array $this->templateService->ext_categorizeEditableConstants($this->constants); - // This array will contain key=[expanded constant name], value=line number in template. (after edit_divider, if any) + // This array will contain key=[expanded constant name], value=line number in template. $this->templateService->ext_regObjectPositions($this->templateRow['constants']); return true; }