Review main Abandoned

59636[WIP][TASK] Split ValidatorResolver

Alexander Schnitzler CR 0 V 0 Hard +530 −384 updated 07/01/19, 15:38

Commit message

todo:

- \TYPO3\CMS\Extbase\Validation\ValidatorResolver::addDomainValidators
  still guesses validator class names. This logic has to take
  place in the ClassSchema as well.

- rst file. Not necessary but would be good.

This patch splits class ValidatorResolver according to its
various functionalities. The validator resolver was like a
god class, doing everything that has to to with validators.

- Guess validator class names from validator identifiers
- Create validator instances
- Detect validators in annotations
- Build validator conjunctions

Most of the detection logic has already been moved into the
ClassSchema class. That's where there are only very few
places left during runtime where Extbase deals with validator
identifiers (like TYPO3.CMS.Extbase:NotEmpty) instead of
validator class names that exist and implement the
ValidatorInterface.

This patch separates the remaining functionalities.

- Resolving class names from validator identifers
  takes place inside the following class:
  \TYPO3\CMS\Extbase\Validation\ValidatorClassNameResolver

- Creating the validator instance takes place inside:
  \TYPO3\CMS\Extbase\Validation\ValidatorFactory

- Building validator conjunctions still remains in the
  \TYPO3\CMS\Extbase\Validation\ValidatorResolver.
  The class name however, is no longer suitable but
  not to be changed for now.

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Files 11