Review main Merged

36140[BUGFIX] Extbase validator should not ask class loader for simple types

Benni Mack CR +2 V +2 Normal +25 −27 updated 01/24/15, 22:22

Commit message

Extbase calls class_exists multiple times to
check for valid classes during set up of Validator
classes. It does these checks even for types
like "string" and "integer" for each
This leads to unnecessary calls to
the TYPO3 class loader and can be avoided.

Review

  • Code review CR +2
    • Benni Mack +2
    • Mathias Schreiber +1
    • Oliver Klee +1
    • Alexander Opitz +1
    • Markus Klein +1
    • Mathias Brodala +1
    • Philipp Gampe +1
  • Verified V +2
    • Benni Mack +2
    • Mathias Schreiber +1
    • Alexander Opitz +1

Issues 1

Files 1

Review log 16

  1. Benni Mack uploaded patch set 1 01/20/15, 12:52

  2. Alexander Opitz voted on patch set 1 CR +1 01/20/15, 13:03

  3. Mathias Schreiber commented on patch set 1 CR +1 V +1 01/20/15, 13:53

    no xdebug hits on string or int
  4. Mathias Brodala commented on patch set 1 CR -1 01/20/15, 14:08

    ValidatorResolver.php:255

    Please "use" this.

    ValidatorResolver.php:255

    Why not !TypeHandlingUtility::isSimpleType()? Comparing boolean with boolean to get boolean is kind of weird. ;-)

    ValidatorResolver.php:272

    Same here.

    ValidatorResolver.php:272

    Same here.
  5. Oliver Klee commented on patch set 1 01/20/15, 14:10

    Matthias B., will you update the change, or should I do it?

    ValidatorResolver.php:272

    I think we can cache the result in a local variable $isLocalType.
  6. Mathias Brodala commented on patch set 1 01/20/15, 14:19

    @Oliver Go ahead, currently only passing by. ;-)

    ValidatorResolver.php:272 Reply

    Not really since two different variables are checked here. ($targetClassName VS $propertyTargetClassName)
  7. Oliver Klee commented on patch set 1 01/20/15, 17:47

    ValidatorResolver.php:255 Reply

    Done

    ValidatorResolver.php:255 Reply

    Done

    ValidatorResolver.php:272 Reply

    Done

    ValidatorResolver.php:272 Reply

    Done
  8. Oliver Klee uploaded patch set 2 01/20/15, 17:47

  9. Oliver Klee voted on patch set 2 CR +1 01/20/15, 17:48

  10. Markus Klein voted on patch set 2 CR +1 01/20/15, 22:34

  11. Mathias Brodala voted on patch set 2 CR +1 01/21/15, 07:14

  12. Alexander Opitz voted on patch set 2 V +1 CR +1 01/21/15, 09:29

  13. Philipp Gampe voted on patch set 2 CR +1 01/22/15, 09:39

  14. Mathias Schreiber voted on patch set 2 CR +1 V +1 01/24/15, 22:20

  15. Benni Mack voted on patch set 2 CR +2 V +2 01/24/15, 22:22

  16. Benni Mack merged patch set 2 01/24/15, 22:22