75251[!!!][TASK] Add property types to FileLinkHandler
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Christian Kuhn +1
-
Verified V +2 Done
- Stefan Bürk +2
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 3
Review log 911
-
crell uploaded patch set 1 07/20/22, 21:31
-
core-ci voted on patch set 1 V +1 07/20/22, 21:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29385
-
crell updated the commit message in patch set 2 07/25/22, 22:23
-
core-ci voted on patch set 2 V +1 07/25/22, 23:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29526
-
Oliver Klee commented on patch set 2 07/26/22, 09:31
-
crell commented on patch set 2 07/26/22, 15:35
FileLinkHandler.php:40ReplyI disagree. Uninitialized is a valid state in PHP. The ??= operator handles both uninitialized and null equally, so it's no different there. However, allowing it to be nullable would, technically, allow it to be set to null explicitly, which would be an error condition. By disallowing that, we avoid a potential type issue (at least in theory). Ideally we'd use readonly here, as it's an even better tool, but PHPStan is still hung up on tying readonly to constructors. (I guess we could just initialize it in the constructor and skip the method entirely, but I'm not sure if that would result in over-initializing the service.) -
Oliver Klee wrote 07/26/22, 16:38
Removed cc Oliver Klee. -
Christian Kuhn commented on patch set 2 07/26/22, 21:35
FileLinkHandler.php:40Replyi agree to larry on the first section: we should keep non-nullable here. -
Christian Kuhn voted on patch set 2 V +1 CR +1 07/26/22, 21:35
-
Stefan Bürk voted on patch set 2 V +2 CR +2 07/26/22, 21:36
-
Stefan Bürk merged patch set 3 07/26/22, 21:36
FileLinkHandler.php:40