83912[FEATURE] Provide null coalescing operator for TypoScript constants
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Garvin Hicking +1
- Torben Hansen +1
- Stefan Bürk +1
- Christian Kuhn +1
- Benni Mack +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Garvin Hicking +1
- Torben Hansen +1
- Stefan Bürk +1
- Christian Kuhn +1
- Benni Mack +1
- core-ci +1 CI
Issues 2
Files 4
- typo3/sysext/core/Classes/TypoScript/Tokenizer/Token/ConstantAwareTokenStream.php5+50 −5
- typo3/sysext/core/Documentation/Changelog/13.1/Feature-103671-ProvideNullCoalescingOperatorForTypoScriptConstants.rst2new+38 −0
- typo3/sysext/core/Tests/Unit/TypoScript/AST/AstBuilderInterfaceTest.php+119 −0
- typo3/sysext/core/Tests/Unit/TypoScript/Tokenizer/TokenizerInterfaceTest.php+33 −0
Review log 2433
Show 68 earlier messages
-
Benjamin Franzke uploaded patch set 1 04/18/24, 08:15
-
Benjamin Franzke commented on patch set 1 04/18/24, 08:16
-
core-ci voted on patch set 1 V +1 04/18/24, 08:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56232
-
Benjamin Franzke commented on patch set 1 04/18/24, 10:19
ConstantAwareTokenStream.php:53ReplyHey lolli, I've now extracted this code from https://review.typo3.org/c/Packages/TYPO3.CMS/+/83321 as we also need it in upcoming sets where settings shall be renamed (desire by Benni and Benji): > https://review.typo3.org/c/Packages/TYPO3.CMS/+/83526/53/typo3/sysext/felogin/Configuration/TypoScript/setup.typoscript Maybe we can have a quick chat an discuss when/how we get this implemented into the tokenizer. I support/like the idea, but don't know how to do that right now, as that means that the tokenizer needs to parse `${…}` contents – which doesn't happen right now IIRC. -
Benjamin Franzke commented on patch set 1 04/19/24, 06:48
ConstantAwareTokenStream.php:53ReplyAlso we need to decide what the syntax should look like: ``` {$foo ?? bar} ``` or ``` {$foo ?? $bar} ``` I chosed the first one, basically because of the current parser that treats `{$` as the start-identifier for a constant-expression: https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/TypoScript/Tokenizer/LosslessTokenizer.php#L882-L908 therefore it felt logical to *not* repeat `$` inside the expression. On the other hand the second syntax would probably be more intuitive for end-users and the expected syntax (e.g. @benjamin.kott@outlook.com would have expected that notation). This syntax will be more challenging for the Tokenizer to differentiate a constant expression from TypoScript block (needs to check whether the closing `}` is on the same line). -
Benjamin Franzke uploaded patch set 2
V +104/19/24, 07:28 -
Benjamin Franzke commented on patch set 2 04/19/24, 07:30
ConstantAwareTokenStream.php:53ReplyI've now switched to `{$foo ?? $bar}` -
core-ci voted on patch set 2 V +1 04/19/24, 07:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56300
-
Benjamin Franzke uploaded patch set 3
V +104/19/24, 12:43 -
core-ci voted on patch set 3 V +1 04/19/24, 12:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56336
-
Christian Kuhn uploaded patch set 4
V +104/19/24, 19:35 -
Christian Kuhn commented on patch set 3 04/19/24, 19:35
ConstantAwareTokenStream.php:76array ;) -
core-ci voted on patch set 4 V +1 04/19/24, 19:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56354
-
Christian Kuhn uploaded patch set 5
V +104/19/24, 19:42 -
Christian Kuhn updated the commit message in patch set 6 04/19/24, 19:43
-
Christian Kuhn uploaded patch set 7 04/19/24, 19:45
-
Christian Kuhn voted on patch set 7 CR +1 V +1 04/19/24, 19:45
-
core-ci voted on patch set 5 V +1 04/19/24, 19:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56356
-
core-ci voted on patch set 7 V +1 04/19/24, 19:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56358
-
core-ci voted on patch set 6 V +1 04/19/24, 19:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56357
-
Christian Kuhn uploaded patch set 8
CR +1V +104/19/24, 19:59 -
Christian Kuhn voted on patch set 8 CR +1 V +1 04/19/24, 20:00
-
core-ci voted on patch set 8 V +1 04/19/24, 20:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56359
-
Garvin Hicking commented on patch set 8 CR +1 V +1 04/19/24, 21:23
nifty :-)Feature-103671-ProvideNullCoalescingOperatorForTypoScriptConstants.rst:34"breaking" -
Benni Mack commented on patch set 9
CR +1V +104/19/24, 22:33Published edit on patch set 8. -
Benni Mack commented on patch set 9 CR +1 V +1 04/19/24, 22:33
Feature-103671-ProvideNullCoalescingOperatorForTypoScriptConstants.rst:34ReplyDone -
core-ci voted on patch set 9 V +1 04/19/24, 22:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56361
-
Garvin Hicking voted on patch set 9 CR +1 V +1 04/20/24, 07:06
-
Christian Kuhn voted on patch set 9 CR +1 V +1 04/20/24, 08:24
-
Stefan Bürk voted on patch set 9 CR +1 V +1 04/20/24, 09:15
-
Torben Hansen voted on patch set 9 CR +1 V +1 04/20/24, 10:55
-
Benjamin Franzke voted on patch set 9 CR +2 V +2 04/22/24, 07:04
-
Benjamin Franzke merged patch set 10 04/22/24, 07:04
ConstantAwareTokenStream.php:53