84891[BUGFIX] Include keys in YamlFileLoader placeholder processing
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Oli Bartsch +1
-
Verified V +2 Done
- Stefan Bürk +2
- Oli Bartsch +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/core/Classes/Configuration/Loader/YamlFileLoader.php13+18 −0
- typo3/sysext/core/Tests/Functional/Configuration/Loader/Fixtures/LoadWihPlaceholdersInKeysResolvedKeyAlreadyExisting.yamlnew+2 −0
- typo3/sysext/core/Tests/Functional/Configuration/Loader/Fixtures/LoadWithPlaceholdersInKeys.yamlnew+12 −0
- typo3/sysext/core/Tests/Functional/Configuration/Loader/Fixtures/LoadWithUnresolvablePlaceholdersInKeys.yamlnew+2 −0
- typo3/sysext/core/Tests/Functional/Configuration/Loader/YamlFileLoaderTest.php+65 −0
Review log 3043
Show 1118 earlier messages
-
David Mellen uploaded patch set 1 06/25/24, 06:13
-
core-ci voted on patch set 1 V +1 06/25/24, 06:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60261
-
Benni Mack updated the commit message in patch set 2
V +106/25/24, 06:32 -
core-ci voted on patch set 2 V +1 06/25/24, 06:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60262
-
Oli Bartsch commented on patch set 2 06/25/24, 08:41
Could we get some test for this? -
Mathias Brodala commented on patch set 2 06/25/24, 08:47
YamlFileLoader.php:193This could lead to overwriting unrelated keys. Was this intentional? E.g: foo: foo value %env(BAR)%: bar value Given B=foo, you'd end up with: foo: bar value Also we should probably also check via $this->containsPlaceholder($k) first. -
Oli Bartsch uploaded patch set 3
V +106/25/24, 08:47 -
Oli Bartsch commented on patch set 3 06/25/24, 08:48
Reply
Done -
core-ci voted on patch set 3 V +1 06/25/24, 08:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60277
-
Oli Bartsch uploaded patch set 4
V +106/25/24, 08:56 -
Oli Bartsch commented on patch set 4 06/25/24, 08:57
YamlFileLoader.php:193ReplyNot sure whether this is intended. I however added this case to the new test. Let's see what was intended by the author. -
core-ci voted on patch set 4 V -1 06/25/24, 09:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60278
-
core-ci voted on patch set 4 V +1 06/25/24, 09:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60278
-
David Mellen uploaded patch set 5
V +106/25/24, 12:06 -
Mathias Brodala commented on patch set 5 CR -1 06/25/24, 12:09
YamlFileLoader.php:196This have more details and mention both the unresolved as well as the resolved key. Otherwise debugging is next to impossible. -
core-ci voted on patch set 5 V +1 06/25/24, 12:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60290
-
David Mellen uploaded patch set 6
CR -1V +106/25/24, 12:20 -
core-ci voted on patch set 6 V +1 06/25/24, 12:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60291
-
David Mellen commented on patch set 6 06/26/24, 09:27
YamlFileLoader.php:193ReplyNot intentional, fixed.YamlFileLoader.php:196ReplyDone -
Mathias Brodala commented on patch set 6 CR -1 06/26/24, 09:42
YamlFileLoader.php:192The unsetting should be done right before setting the new key. This ensures that code catching the exception still has access to the unprocessed value.YamlFileLoader.php:201This can be merged into one line, no need to overwrite $k anymore. -
David Mellen commented on patch set 6 06/26/24, 10:13
YamlFileLoader.php:201Reply$k has to be overwritten to process the value placeholders or am I wrong? -
Mathias Brodala commented on patch set 6 06/26/24, 10:19
YamlFileLoader.php:201ReplyIndeed, the loop continues afterwards, missed that. Then this is correct. -
David Mellen uploaded patch set 7
CR -1V +106/26/24, 10:42 -
Mathias Brodala commented on patch set 7 CR +1 06/26/24, 10:42
YamlFileLoader.php:192ReplyDone -
David Mellen commented on patch set 7 06/26/24, 10:43
YamlFileLoader.php:192ReplyDone -
core-ci voted on patch set 7 V -1 06/26/24, 10:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60371
-
David Mellen rebased onto patch set 8
CR +1V -106/28/24, 09:23 -
core-ci voted on patch set 7 V -1 06/28/24, 09:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60371
-
core-ci voted on patch set 8 V +1 06/28/24, 09:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60542
-
Oli Bartsch voted on patch set 8 CR +1 V +1 06/28/24, 09:39
-
Georg Ringer voted on patch set 8 CR +1 V +1 06/28/24, 20:03
-
Stefan Bürk voted on patch set 8 CR -1 06/29/24, 13:32
-
Stefan Bürk commented on patch set 8 06/29/24, 14:57
YamlFileLoader.php:194I'd say that this message should be splitted into dedicated message to make clear what happend, as this is now thrown for two different cases: a) placeholder resolved to a value already existing as key b) placeholder not resolved staying the same key, detected as existing. Usually, unresolvable placeholder are silently not further handled. So we need to decide to either silently swallow unresolable placeholders OR throw a dedicated exception message (and code) for that case to have here a distinction between these two cases. -
Stefan Bürk uploaded patch set 9
CR +1V +106/29/24, 14:58 -
Stefan Bürk commented on patch set 9 06/29/24, 14:59
YamlFileLoader.php:194ReplyPushed the varant with a dedicated message along with further tests for these scenarios. -
core-ci voted on patch set 9 V -1 06/29/24, 15:04 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60632
-
Stefan Bürk uploaded patch set 10
V -106/29/24, 21:02 -
core-ci voted on patch set 10 V -1 06/29/24, 21:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60646
-
core-ci voted on patch set 10 V +1 06/29/24, 21:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/60646
-
Stefan Bürk voted on patch set 10 CR +1 V +1 06/29/24, 22:08
-
Oli Bartsch voted on patch set 10 CR +1 V +1 06/30/24, 07:49
-
Stefan Bürk voted on patch set 10 CR +2 V +2 06/30/24, 11:39
-
Stefan Bürk merged patch set 11 06/30/24, 11:55