89444[BUGFIX] Support access to specific property validators
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Oliver Klee +1
- Jochen Roth +1
- Oliver Hader +1
-
Verified V +2 Done
- Christian Kuhn +2
- Oliver Klee +1
- Jochen Roth +1
- Oliver Hader +1
- core-ci +1 CI
Issues 1
Files 2
Review log 1621
-
Elias Häußler uploaded patch set 1 05/19/25, 10:56
-
Elias Häußler uploaded patch set 2 05/19/25, 10:57
-
core-ci voted on patch set 1 V +1 05/19/25, 11:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79158
-
core-ci voted on patch set 2 V +1 05/19/25, 11:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79159
-
Oliver Klee voted on patch set 2 CR +1 V +1 05/19/25, 11:51
-
Stefan Bürk commented on patch set 2 05/19/25, 18:42
GenericObjectValidatorTest.php:237```suggestion $validatorForFoo = $this->createStub(ValidatorInterface::class); $validatorForBar = $this->createStub(ValidatorInterface::class); ``` Full blown mocks not required here, no expecations added nor any overrides and operating on interface. Let's use slimmer stubs here.GenericObjectValidatorTest.php:261```suggestion $validatorForFoo = $this->createStub(ValidatorInterface::class); $validatorForBar = $this->createStub(ValidatorInterface::class); ``` Full blown mocks not required here, no expecations added nor any overrides and operating on interface. Let's use slimmer stubs here. -
Elias Häußler commented on patch set 2 05/19/25, 19:45
AbstractGenericObjectValidator.php:159ReplyAFAIK, using `@return` won't enable us to use conditional return types. We could, however, combine both like so: ``` @return array<string, \SplObjectStorage<ValidatorInterface>>|\SplObjectStorage<ValidatorInterface> @phpstan-return ($propertyName is null ? array<string, \SplObjectStorage<ValidatorInterface>> : \SplObjectStorage<ValidatorInterface>) ``` But I'm not sure if this may confuse PHPStan. -
Elias Häußler uploaded patch set 3
CR +1V +105/19/25, 19:49 -
Elias Häußler commented on patch set 3 05/19/25, 19:49
GenericObjectValidatorTest.php:237ReplyDoneGenericObjectValidatorTest.php:261ReplyDone -
core-ci voted on patch set 3 V -1 05/19/25, 19:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79176
-
Elias Häußler uploaded patch set 4
V -105/19/25, 19:56 -
core-ci voted on patch set 4 V +1 05/19/25, 20:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79177
-
Oliver Klee commented on patch set 4 05/19/25, 20:05
AbstractGenericObjectValidator.php:159ReplyYes, we can use the normal `@return` here as far as PHPStan is concerned: https://phpstan.org/writing-php-code/phpdoc-types#conditional-return-types -
Elias Häußler uploaded patch set 5
V +105/19/25, 20:12 -
Elias Häußler commented on patch set 4 05/19/25, 20:12
AbstractGenericObjectValidator.php:159ReplyDone -
core-ci voted on patch set 5 V +1 05/19/25, 20:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79178
-
Oliver Klee voted on patch set 5 CR +1 V +1 05/19/25, 20:18
-
Jochen Roth voted on patch set 5 CR +1 V +1 05/19/25, 20:52
-
Oliver Hader voted on patch set 5 CR +1 V +1 05/20/25, 06:19
-
Christian Kuhn voted on patch set 5 CR +2 V +2 05/20/25, 15:07
-
Christian Kuhn merged patch set 6 05/20/25, 15:07
AbstractGenericObjectValidator.php:159