Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Warn about empty @import in TypoScript
When @import or <INCLUDE_TYPOSCRIPT: lines do not resolve to any include, this probably indicates a broken import statement. To help integrators find and fix those, the Page TSconfig and TypoScript backend modules now list them as "Syntax scanner warnings". We're adding a functional test to verify the detection works. This will ensure it does not break when we refactor some details of the include tree structure later. Doing as described in #102102 and #102103 would simplify and streamline various details, but it's currently unclear if we should still do this in v12. Resolves: #102064 Related: #100218 Related: #97816 Related: #102102 Related: #102103 Releases: main, 12.4 Change-Id: I1bba0cead97ff81b38c97f18581275edee01ea63 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/81358 Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: core-ci <typo3@b13.com>
- Loading branch information
Showing
15 changed files
with
165 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ript/IncludeTree/Fixtures/IncludeTreeSyntaxScannerVisitor/Imports/validImportA.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
validImportA = validImportA |
1 change: 1 addition & 0 deletions
1
...ipt/IncludeTree/Fixtures/IncludeTreeSyntaxScannerVisitor/Imports/validImportB1.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
validImportB1 = validImportB1 |
1 change: 1 addition & 0 deletions
1
...ipt/IncludeTree/Fixtures/IncludeTreeSyntaxScannerVisitor/Imports/validImportB2.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
validImportB2 = validImportB2 |
1 change: 1 addition & 0 deletions
1
...ript/IncludeTree/Fixtures/IncludeTreeSyntaxScannerVisitor/Imports/validImportC.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
validImportC = validImportC |
1 change: 1 addition & 0 deletions
1
...ipt/IncludeTree/Fixtures/IncludeTreeSyntaxScannerVisitor/Imports/validImportD1.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
validImportD1 = validImportD1 |
1 change: 1 addition & 0 deletions
1
...ipt/IncludeTree/Fixtures/IncludeTreeSyntaxScannerVisitor/Imports/validImportD2.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
validImportD1 = validImportD1 |
1 change: 1 addition & 0 deletions
1
...eTree/Fixtures/IncludeTreeSyntaxScannerVisitor/Imports/validIncludeTypoScriptA.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
validIncludeTypoScriptA = validIncludeTypoScriptA |
1 change: 1 addition & 0 deletions
1
...eTree/Fixtures/IncludeTreeSyntaxScannerVisitor/Imports/validIncludeTypoScriptB.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
validIncludeTypoScriptC = validIncludeTypoScriptC |
6 changes: 6 additions & 0 deletions
6
...nctional/TypoScript/IncludeTree/Fixtures/IncludeTreeSyntaxScannerVisitor/RootTemplate.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
"pages" | ||
,"uid","pid","sorting","deleted","t3_origuid","t3ver_wsid","t3ver_state","t3ver_stage","t3ver_oid","title","slug" | ||
,1,0,256,0,0,0,0,0,0,"FunctionalTest","/" | ||
"sys_template" | ||
,"uid","pid","sorting","deleted","hidden","starttime","endtime","t3_origuid","root","clear","include_static_file","constants","config","basedOn","includeStaticAfterBasedOn","static_file_mode" | ||
,1,1,256,0,0,0,0,0,1,3,"","@import 'EXT:core/Tests/Functional/TypoScript/IncludeTree/Fixtures/IncludeTreeSyntaxScannerVisitor/includes.typoscript","","",0,0 |
16 changes: 16 additions & 0 deletions
16
...ional/TypoScript/IncludeTree/Fixtures/IncludeTreeSyntaxScannerVisitor/includes.typoscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
this.is.invalid < | ||
@import './Imports/validImportA.typoscript' | ||
@import './invalidImport.typoscript' | ||
@import './Imports/validImportB*.typoscript' | ||
@import './invalidFullDirImport/' | ||
<INCLUDE_TYPOSCRIPT: source="FILE:./Imports/validIncludeTypoScriptA.typoscript"> | ||
<INCLUDE_TYPOSCRIPT: source="FILE:./invalidIncludeTypoScript.typoscript"> | ||
[frontend.user.isLoggedIn] | ||
@import './Imports/validImportC.typoscript' | ||
@import './invalidImport.typoscript' | ||
@import './Imports/validImportD*.typoscript' | ||
<INCLUDE_TYPOSCRIPT: source="FILE:./Imports/validIncludeTypoScriptB.typoscript"> | ||
<INCLUDE_TYPOSCRIPT: source="FILE:./invalidIncludeTypoScript.typoscript"> | ||
this.is.invalid < | ||
[global] | ||
this.is.invalid < |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters