73245[TASK] Remove broken test from ServiceProviderCompilationPassTest
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Christian Kuhn +1
- Benni Mack +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Christian Kuhn +1
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 2
Review log 1722
-
Benjamin Franzke uploaded patch set 1 01/31/22, 09:58
-
core-ci voted on patch set 1 V -1 01/31/22, 10:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22784
-
Benjamin Franzke uploaded patch set 2 01/31/22, 10:01
-
Benjamin Franzke uploaded patch set 3 01/31/22, 10:05
-
Christian Kuhn commented on patch set 3 01/31/22, 10:13
-
core-ci voted on patch set 2 V +1 01/31/22, 10:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22785
-
core-ci voted on patch set 3 V +1 01/31/22, 10:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22786
-
Benjamin Franzke commented on patch set 3 01/31/22, 10:20
ServiceProviderCompilationPassTest.php:223ReplyYup, this basically checks whether wrong factories are catched due to proper type declarations. Therefore it's the php parser that throws the TypeError which is asserted here. Otherwise we could add an `is_callable()` check in https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/DependencyInjection/ServiceProviderCompilationPass.php#L90 …and throw an own exception, but I somehow liked `registerService()` automatically asserts the type thanks to PHP type declarations. but I'm not sure what's the best approach here. -
Benjamin Franzke commented on patch set 3 01/31/22, 10:26
ServiceProviderCompilationPassTest.php:223ReplyOh, and btw, PHPStan in currently fine with not adding a `is_callable()` check because the interface defines `@return callable[]`: https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/DependencyInjection/ServiceProviderInterface.php#L34 -
Christian Kuhn commented on patch set 3 01/31/22, 10:29
ServiceProviderCompilationPassTest.php:223Replyi think we can keep the current approach. using language constructs is usually better than rolling own stuff. question is only if we want to test for this at all since there is little additional value in testing a language construct that is (hopefully) tested in the language already. -
Christian Kuhn commented on patch set 3 01/31/22, 10:33
ServiceProviderCompilationPassTest.php:223Replyas far as i can see, the only value of the test is that it basically checks if there is a 'callable' type hint in our implementation. unsure if that is worth it. -
Benjamin Franzke commented on patch set 3 01/31/22, 10:37
ServiceProviderCompilationPassTest.php:223Replyyour analysis is right, that is the only check that is done in that test method, yea. I'm also unsure if that is worth it. :\ -
Christian Kuhn commented on patch set 3 01/31/22, 10:39
ServiceProviderCompilationPassTest.php:223Replyimho: drop the test ;) but that's my personal taste in those cases. you decide, i can live and will vote both. -
Benjamin Franzke uploaded patch set 4 01/31/22, 10:57
-
Benjamin Franzke commented on patch set 4 01/31/22, 10:57
ServiceProviderCompilationPassTest.php:223Replyremoved. -
core-ci voted on patch set 4 V -1 01/31/22, 10:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22789
-
Benjamin Franzke uploaded patch set 5 01/31/22, 11:03
-
core-ci voted on patch set 5 V +1 01/31/22, 11:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22792
-
Christian Kuhn voted on patch set 5 V +1 CR +1 01/31/22, 11:24
-
Benni Mack voted on patch set 5 V +1 CR +1 01/31/22, 12:01
-
Benjamin Franzke voted on patch set 5 V +2 CR +2 01/31/22, 12:07
-
Benjamin Franzke merged patch set 6 01/31/22, 12:07
ServiceProviderCompilationPassTest.php:223