[TASK] Require array in setFlatConstants()
Constant substitution in TS parser is implemented in ConstantAwareTokenStream. It kicks in by casting the stream to string after existing constants have been set using ConstantAwareTokenStream->setFlatConstants(). To not have a "polluted" stream after setFlatConstants(), the constants are reset using setFlatConstants(null) after use. Ugly. Patch #102742 established a partial solution already by cloning the stream instead. Finish the clone approach to disallow setFlatConstants(null). Add two missing void return annotations at related places along the way. Resolves: #103982 Related: #97816 Related: #102742 Releases: main, 12.4 Change-Id: I964bb40dfa1e29b23f876ba85ad05ba2a94ca6d6 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84506 Reviewed-by:Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Garvin Hicking <gh@faktor-e.de> Tested-by:
Garvin Hicking <gh@faktor-e.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Stefan Bürk <stefan@buerk.tech>
Showing
- typo3/sysext/core/Classes/TypoScript/AST/AstBuilder.php 1 addition, 1 deletiontypo3/sysext/core/Classes/TypoScript/AST/AstBuilder.php
- typo3/sysext/core/Classes/TypoScript/IncludeTree/Visitor/IncludeTreeAstBuilderVisitor.php 1 addition, 1 deletion...ript/IncludeTree/Visitor/IncludeTreeAstBuilderVisitor.php
- typo3/sysext/core/Classes/TypoScript/IncludeTree/Visitor/IncludeTreeCommentAwareAstBuilderVisitor.php 1 addition, 1 deletion...Tree/Visitor/IncludeTreeCommentAwareAstBuilderVisitor.php
- typo3/sysext/core/Classes/TypoScript/Tokenizer/Token/ConstantAwareTokenStream.php 1 addition, 1 deletion...s/TypoScript/Tokenizer/Token/ConstantAwareTokenStream.php
Please register or sign in to comment