78551[TASK] Enable strict typing for Icon::class and add title
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Oliver Klee +1
-
Verified V +2 Done
- Benni Mack +2
- Oliver Klee +1
- core-ci +1 CI
Issues 1
Files 1
Review log 1418
-
Benjamin Kott uploaded patch set 1 04/10/23, 11:35
-
Benjamin Kott updated the commit message in patch set 2 04/10/23, 11:36
-
core-ci voted on patch set 2 V -1 04/10/23, 12:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40406
-
core-ci voted on patch set 1 V -1 04/10/23, 12:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40405
-
Oliver Klee commented on patch set 2 04/10/23, 12:51
-
Benjamin Kott uploaded patch set 3
V -104/10/23, 16:13 -
Benjamin Kott commented on patch set 3 04/10/23, 16:19
Icon.php:113ReplyThat would only make sense if we intend to let people extend it right? I think we should we should avoid phpstan only annotations if possible. I see no case that would make it necessary to extend this class, and would prefer to have it final at some point -
core-ci voted on patch set 3 V +1 04/10/23, 16:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40414
-
Oliver Klee commented on patch set 3 04/10/23, 17:16
Icon.php:113ReplyNo, this also helps us find/avoid bugs in the Core (as PHPStan then can analyze the Core code better). -
Oliver Klee commented on patch set 3 04/10/23, 17:32
Icon.php:113ReplyAnd concerning the PHPStan-only annotations: As we also have the native `self` type declaration, even IDEs that do not recognize the `@return $this` annotation at least know the returned class. So we're not blocking/losing anything with the added annotation, but are gaining additional type safety by analysis. -
Oliver Klee commented on patch set 3 04/10/23, 17:32
Icon.php:113ReplyAnd it also helps people who are using this class. -
Benjamin Kott commented on patch set 3 04/10/23, 21:04
Icon.php:113ReplyI get your point, but it´s only relevant of you are EXTENDING this class - otherwise also phpstan will understand the native return type. As it should not be extended anyways and be final in the best case, there is no benefit in adding the annotation. It will always return an instance of Icon::class and nothing else. -
Oliver Klee uploaded patch set 4
V +104/11/23, 09:19 -
Oliver Klee commented on patch set 4 CR +1 04/11/23, 09:19
Icon.php:113ReplyDone (after a short discussion). -
core-ci voted on patch set 4 V +1 04/11/23, 09:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/40446
-
Oliver Klee voted on patch set 4 V +1 04/11/23, 09:42
-
Benni Mack voted on patch set 4 V +2 CR +2 04/11/23, 09:44
-
Benni Mack merged patch set 5 04/11/23, 09:44
Icon.php:113