77984[TASK] Ensure type safety in YamlFileLoader
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Oliver Klee +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Christian Kuhn +2
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 1
Review log 3035
Show 810 earlier messages
-
Thomas Hohn uploaded patch set 1 02/28/23, 18:14
-
core-ci voted on patch set 1 V +1 02/28/23, 18:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38226
-
Thomas Hohn uploaded patch set 2
V +102/28/23, 18:22 -
Stefan Bürk voted on patch set 2 V +1 CR +1 02/28/23, 18:29
-
core-ci voted on patch set 2 V +1 02/28/23, 18:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38227
-
Oliver Klee voted on patch set 2 CR +1 02/28/23, 20:14
-
Oli Bartsch voted on patch set 2 V +1 CR +1 02/28/23, 20:30
-
Simon Schaufelberger commented on patch set 2 03/01/23, 00:02
This is basically the same as https://review.typo3.org/c/Packages/TYPO3.CMS/+/77978 but handled in a slightly different way there. which method do you prefer? -
Thomas Hohn uploaded patch set 3
CR +1V +103/01/23, 05:04 -
Thomas Hohn commented on patch set 3 03/01/23, 05:05
Reply
I would prefer to go for consistency and have it as in https://review.typo3.org/c/Packages/TYPO3.CMS/+/77978, since it makes the it more robust. There is also really no need to try to fetch the content for a file that isn't readable.
-
core-ci voted on patch set 3 V +1 03/01/23, 05:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38243
-
Christian Kuhn voted on patch set 3 V +1 CR +1 03/01/23, 08:33
-
Oliver Klee voted on patch set 3 CR +1 03/01/23, 08:55
-
Simon Schaufelberger voted on patch set 3 V +1 CR +1 03/01/23, 09:47
-
Christian Kuhn commented on patch set 3 03/01/23, 10:06
YamlFileLoader.php:109i'd say the is_readable is useless, we can rely on (string)file_get_contents($fileName) only. -
Benni Mack commented on patch set 3 03/01/23, 10:08
YamlFileLoader.php:109ReplyI agree. probably "(string)@file_get_contents($fileName)" -
Christian Kuhn uploaded patch set 4
CR +1V +103/01/23, 10:08 -
Christian Kuhn commented on patch set 3 V +1 CR +1 03/01/23, 10:09
YamlFileLoader.php:109ReplyDone -
Christian Kuhn voted on patch set 4 V +1 CR +1 03/01/23, 10:09
-
Stefan Bürk voted on patch set 4 V +1 CR +1 03/01/23, 10:09
-
Christian Kuhn voted on patch set 4 CR -1 03/01/23, 10:12
-
Christian Kuhn commented on patch set 4 03/01/23, 10:14
YamlFileLoader.php:109Replyactually, it's probably better to keep the is_readable, since file_get_contents() tends to raise a "Failed to open stream: No such file or directory" warning, otherwise, see https://forge.typo3.org/issues/99926 and patch. i'll go back to version 3. -
Christian Kuhn uploaded patch set 5
CR +1V +103/01/23, 10:15 -
Thomas Hohn commented on patch set 4 03/01/23, 10:15
YamlFileLoader.php:109ReplyActually the is_readable($fileName) was added to avoid triggering a PHP warning in case the file doesn't exist -
Christian Kuhn voted on patch set 5 V +1 CR +1 03/01/23, 10:15
-
core-ci voted on patch set 4 V +1 03/01/23, 10:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38256
-
Christian Kuhn commented on patch set 5 03/01/23, 10:16
YamlFileLoader.php:109ReplyAck -
core-ci voted on patch set 5 V +1 03/01/23, 10:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38257
-
Oliver Klee voted on patch set 5 CR +1 03/01/23, 10:25
-
Thomas Hohn commented on patch set 5 03/01/23, 10:32
YamlFileLoader.php:109ReplySo should I add it again - with a comment in the code? -
Thomas Hohn commented on patch set 5 03/01/23, 10:55
YamlFileLoader.php:109ReplyDone -
Simon Schaufelberger commented on patch set 5 V +1 CR +1 03/01/23, 11:35
just do the same thing in the LocalDriver as well -
Thomas Hohn commented on patch set 5 03/01/23, 11:55
Reply
Yes - we do it in identical ways ;-) -
Christian Kuhn voted on patch set 5 V +2 CR +2 03/01/23, 12:10
-
Christian Kuhn merged patch set 6 03/01/23, 12:10