FEATURE: Also check TypoScript objects

* Not only check paths, but also objects like cObjects.
* Update test input for verification.
* Add further breaking changes for 7.1
This commit is contained in:
Daniel Siepmann 2017-04-13 15:22:38 +02:00
parent 12fcc704dc
commit ca4d687155
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
3 changed files with 70 additions and 1 deletions

View file

@ -0,0 +1,26 @@
# Breaking changes in 8.0: https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.1/Index.html#breaking-changes
'7.1':
lib.parseFunc_RTE.externalBlocks.blockquote.callRecursive.tagStdWrap.HTMLparser:
replacement: 'It is recommended to fix the margins inside your website CSS. Alternatively, you can re-add the above TypoScript lines to your website TypoScript template (not recommended)'
docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.1/Breaking-44879-CSSStyledContentTypoScriptBlockQuoteInlineStylesRemoved.html'
lib.parseFunc_RTE.externalBlocks.blockquote.callRecursive.tagStdWrap.HTMLparser.tags.blockquote.overrideAttribs:
replacement: 'It is recommended to fix the margins inside your website CSS. Alternatively, you can re-add the above TypoScript lines to your website TypoScript template (not recommended)'
docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.1/Breaking-44879-CSSStyledContentTypoScriptBlockQuoteInlineStylesRemoved.html'
config.meaningfulTempFilePrefix:
replacement: 'All files will always have their original filename fully prepended when stored in the folder typo3temp/GB/. Just remove the setting'
docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.1/Breaking-62886-RemoveMeaningfulTempFilePrefix.html'
new CLEARGIF:
replacement: 'Any installation should migrate to alternatives such as FLUIDTEMPLATE to customize the output of the content.'
docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.1/Breaking-64639-RemovedContentObjects.html'
new COLUMNS:
replacement: 'Any installation should migrate to alternatives such as FLUIDTEMPLATE to customize the output of the content.'
docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.1/Breaking-64639-RemovedContentObjects.html'
new CTABLE:
replacement: 'Any installation should migrate to alternatives such as FLUIDTEMPLATE to customize the output of the content.'
docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.1/Breaking-64639-RemovedContentObjects.html'
new OTABLE:
replacement: 'Any installation should migrate to alternatives such as FLUIDTEMPLATE to customize the output of the content.'
docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.1/Breaking-64639-RemovedContentObjects.html'
new HRULER:
replacement: 'Any installation should migrate to alternatives such as FLUIDTEMPLATE to customize the output of the content.'
docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.1/Breaking-64639-RemovedContentObjects.html'

View file

@ -19,10 +19,41 @@ class Typo3Update_Sniffs_Removed_TypoScriptObjectIdentifierSniff extends Abstrac
public function register()
{
return [
TokenInterface::TYPE_OBJECT_CONSTRUCTOR,
TokenInterface::TYPE_OBJECT_IDENTIFIER,
];
}
/**
* Prepares structure from config for later usage.
*
* @param array $typo3Versions
* @return array
*/
protected function prepareStructure(array $typo3Versions)
{
$newStructure = [];
foreach ($typo3Versions as $typo3Version => $removals) {
foreach ($removals as $removed => $config) {
$config['type'] = TokenInterface::TYPE_OBJECT_IDENTIFIER;
// If starting with new, it's a constructor, meaning content object or other Object.
if (strtolower(substr($removed, 0, 4)) === 'new ') {
$config['type'] = TokenInterface::TYPE_OBJECT_CONSTRUCTOR;
$removed = substr($removed, 4);
}
$config['name'] = $removed;
$config['version_removed'] = $typo3Version;
$newStructure[$removed] = $config;
}
}
return $newStructure;
}
/**
* Check whether the current token is removed.
*
@ -36,7 +67,7 @@ class Typo3Update_Sniffs_Removed_TypoScriptObjectIdentifierSniff extends Abstrac
$token = $tokens[$stackPtr];
$objectIdentifier = $token['content'];
if (isset($this->configured[$objectIdentifier])) {
if (isset($this->configured[$objectIdentifier]) && $token['type'] === $this->configured[$objectIdentifier]['type']) {
$this->removed = [
$this->configured[$objectIdentifier]
];

View file

@ -17,3 +17,15 @@ mod {
alternateBgColors = 1
}
}
page {
CLEARGIF {
value = test
}
10 = CLEARGIF
11 = COLUMNS
12 = CTABLE
13 = OTABLE
14 = HRULER
}