Review main Merged

29722[BUGFIX] Reimplement ranges in NumberRangeValidator

Stefan Froemken CR +2 V +2 Easy +25 −8 updated 12/03/15, 12:39

Commit message

We have removed startRange and endRange too early
in NumberRangeValidator. As long as TYPO3 6.3
is not reached we have to reimplement these options
again.

Review

  • Code review CR +2
    • Markus Klein +2
    • Wouter Wolters +1
  • Verified V +2
    • Markus Klein +2
    • Wouter Wolters +1

Issues 1

Files 2

Review log 31

Show 6 earlier messages
  1. Markus Klein updated the commit message in patch set 1 04/29/14, 08:58

  2. Markus Klein updated the commit message in patch set 2 04/29/14, 09:07

  3. Markus Klein voted on patch set 3 CR +1 04/29/14, 09:07

  4. Andreas Allacher voted on patch set 3 CR +1 04/29/14, 09:10

  5. Mr. Jenkins commented on patch set 1 04/29/14, 09:15

  6. Mr. Jenkins commented on patch set 2 04/29/14, 09:15

  1. Oliver Hader commented on patch set 3 04/29/14, 09:18

    Will update tests...
  2. Mr. Jenkins commented on patch set 3 04/29/14, 09:29

  3. Oliver Hader uploaded patch set 4 04/29/14, 09:34

  4. Oliver Hader commented on patch set 4 V +1 CR +2 04/29/14, 09:35

    Added unit test for the deprecated options
  5. Mr. Jenkins commented on patch set 4 04/29/14, 09:48

  6. Markus Klein voted on patch set 4 V +1 CR +1 04/29/14, 10:02

  7. Stefan Froemken uploaded patch set 5 04/29/14, 12:14

  8. Markus Klein commented on patch set 5 04/29/14, 12:27

    NumberRangeValidator.php:76

    Hm had a look at this. The base class always sets all supportedOptions in the $this->options array. So the isset() check is always TRUE.
  9. Mr. Jenkins commented on patch set 5 04/29/14, 12:27

  10. Stefan Froemken uploaded patch set 6 04/29/14, 14:36

  11. Markus Klein commented on patch set 6 04/29/14, 14:45

    Please discuss a solution first before pushing new patch sets. ;-)

    NumberRangeValidator.php:72

    Why the empty check now??
  12. Mr. Jenkins commented on patch set 6 04/29/14, 14:49

  13. Stefan Froemken commented on patch set 6 04/29/14, 15:02

    NumberRangeValidator.php:72 Reply

    What do you think? Remove the complete &&-part?
  14. Markus Klein commented on patch set 6 04/29/14, 15:08

    NumberRangeValidator.php:72 Reply

    Sure, we don't need it at all. The option is always set and the value is either the default value or the one specified by the user.
  15. Stefan Froemken uploaded patch set 7 04/29/14, 15:20

  16. Mr. Jenkins commented on patch set 7 04/29/14, 15:43

  17. Wouter Wolters commented on patch set 7 V -1 04/29/14, 17:29

    PHP Fatal error: Call to a member function exec_SELECTgetSingleRow() on a non-object in /var/www/websites/master/htdocs/typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php on line 182 When running unittests
  18. Markus Klein commented on patch set 7 04/29/14, 18:08

    Ok the problem is that setOptions() allows to circumvent the preparations in the constructor. We need to keep the checks that protect us from this.
  19. Markus Klein uploaded patch set 8 04/29/14, 18:12

  20. Markus Klein voted on patch set 8 V +1 CR +1 04/29/14, 18:13

  21. Mr. Jenkins commented on patch set 8 04/29/14, 18:27

  22. Wouter Wolters voted on patch set 8 V +1 CR +1 04/29/14, 18:29

  23. Markus Klein commented on patch set 8 V +2 CR +2 04/29/14, 21:14

    As this is a regression, I'm merging.
  24. Markus Klein merged patch set 9 04/29/14, 21:14

  25. Stephan Großberndt commented on patch set 9 12/03/15, 12:39

    Post -1 The code always uses the default values of "minimum" and "maximum". If you use * @validate NumberRange (startRange = 0, endRange = 2) this will never be checked, but the default values from $this->supportedOptions of minimum/maximum