From e1b3f31c780bfe91490ef97b9df7a2b265f72e63 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 13 Apr 2017 14:20:36 +0200 Subject: [PATCH] FEATURE: Add second TypoScript check * Extend test to show what's possible and covered and what is not covered yet. Relates: #54 --- .../TypoScript/ObjectIdentifier/7.0.yaml | 3 +++ .../Expected.json | 22 +++++++++++++++++-- .../InputFileForIssues.ts | 15 +++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/src/Standards/Typo3Update/Configuration/Removed/TypoScript/ObjectIdentifier/7.0.yaml b/src/Standards/Typo3Update/Configuration/Removed/TypoScript/ObjectIdentifier/7.0.yaml index 33fa3d1..505ace8 100644 --- a/src/Standards/Typo3Update/Configuration/Removed/TypoScript/ObjectIdentifier/7.0.yaml +++ b/src/Standards/Typo3Update/Configuration/Removed/TypoScript/ObjectIdentifier/7.0.yaml @@ -3,3 +3,6 @@ styles.insertContent: replacement: 'Either remove usage of styles.insertContent or add a snippet at an early point in TypoScript for backwards compatibility' docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-42543-DefaultTypoScriptRemoved.html' + mod.web_list.alternateBgColors: + replacement: 'Removed without substitution' + docsUrl: 'https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-53658-RemoveAlternateBgColorsOption.html' diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Removed/TypoScriptObjectIdentifierSniff/Expected.json b/tests/Fixtures/Standards/Typo3Update/Sniffs/Removed/TypoScriptObjectIdentifierSniff/Expected.json index f5f9a91..e40c7dd 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Removed/TypoScriptObjectIdentifierSniff/Expected.json +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Removed/TypoScriptObjectIdentifierSniff/Expected.json @@ -20,14 +20,32 @@ "severity": 5, "source": "Typo3Update.Removed.TypoScriptObjectIdentifier.styles-insertContent", "type": "WARNING" + }, + { + "column": 1, + "fixable": false, + "line": 6, + "message": "Legacy calls are not allowed; found styles.insertContent. Removed in 7.0. Either remove usage of styles.insertContent or add a snippet at an early point in TypoScript for backwards compatibility. See: https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-42543-DefaultTypoScriptRemoved.html", + "severity": 5, + "source": "Typo3Update.Removed.TypoScriptObjectIdentifier.styles-insertContent", + "type": "WARNING" + }, + { + "column": 1, + "fixable": false, + "line": 13, + "message": "Legacy calls are not allowed; found mod.web_list.alternateBgColors. Removed in 7.0. Removed without substitution. See: https://docs.typo3.org/typo3cms/extensions/core/7.6/Changelog/7.0/Breaking-53658-RemoveAlternateBgColorsOption.html", + "severity": 5, + "source": "Typo3Update.Removed.TypoScriptObjectIdentifier.mod-web_list-alternateBgColors", + "type": "WARNING" } ], - "warnings": 2 + "warnings": 4 } }, "totals": { "errors": 0, "fixable": 0, - "warnings": 2 + "warnings": 4 } } diff --git a/tests/Fixtures/Standards/Typo3Update/Sniffs/Removed/TypoScriptObjectIdentifierSniff/InputFileForIssues.ts b/tests/Fixtures/Standards/Typo3Update/Sniffs/Removed/TypoScriptObjectIdentifierSniff/InputFileForIssues.ts index 660a53c..3696fb7 100644 --- a/tests/Fixtures/Standards/Typo3Update/Sniffs/Removed/TypoScriptObjectIdentifierSniff/InputFileForIssues.ts +++ b/tests/Fixtures/Standards/Typo3Update/Sniffs/Removed/TypoScriptObjectIdentifierSniff/InputFileForIssues.ts @@ -2,3 +2,18 @@ page { 10 < styles.insertContent 10 =< styles.insertContent } + +styles.insertContent { + select { + where = colPos=1 + } +} + +# already covered +mod.web_list.alternateBgColors = 1 +# Not covered yet +mod { + web_list { + alternateBgColors = 1 + } +}