Review main Merged

37804[BUGFIX] Avoid exception when validating FQCN

Andreas Allacher CR +2 V +2 Easy +3 −0 updated 05/08/15, 09:39

Commit message

Strip the leading backslash of the fully qualified classname to avoid the
exception "1420281366" when using @validate.

Review

  • Code review CR +2
    • Andreas Kienast +2
    • Benni Mack +1
  • Verified V +2
    • Andreas Kienast +2
    • Benni Mack +1

Issues 1

Files 1

Review log 14

  1. Andreas Allacher uploaded patch set 1 03/13/15, 06:44

  2. Andreas Kienast updated the commit message in patch set 2 03/13/15, 07:20

  3. Andreas Kienast voted on patch set 2 CR +1 03/13/15, 07:20

  4. Markus Klein commented on patch set 2 CR -1 04/13/15, 21:27

    We agreed that we want to educate the developers on proper coding, hence we keep throwing exceptions. We did the same for the makeInstance(). I opt to abandon this patch
  5. Andreas Allacher commented on patch set 2 04/16/15, 19:22

    Well that is proper annotation encoding Because IDE wants "\" at the beginning to find classes when using namespaces. So this is different in regards to makeInstance
  6. Andreas Allacher commented on patch set 2 04/16/15, 19:39

    Although @validate isn't really verified by IDE anyway so it might not matter.
  7. Andreas Allacher commented on patch set 2 04/16/15, 19:44

    However, if so then at least the comment is wrong because it say \Acme\Ext\Validation\Validator\FooValidator One other thing: If using property mapping it also works with the "\" at the beginning because here the IDE requires it, so it would make sense to do the same for validation.
  8. Markus Klein commented on patch set 2 CR 0 04/16/15, 23:21

    Ok, actually my opinion is not too strong here and I can't test anyway.
  9. Markus Klein commented on patch set 2 04/16/15, 23:21

    Ah is this master only? or 6.2 as well?
  10. Andreas Allacher commented on patch set 2 04/17/15, 05:49

    I first encountered the issue when updating from 6.2 to master where an extension had a leading "\" so no. Which makes sense as in 6.2. https://git.typo3.org/Packages/TYPO3.CMS.git/blob/refs/heads/TYPO3_6-2:/typo3/sysext/core/Classes/Utility/GeneralUtility.php#l4392 did not throw an exception but just removed it.
  11. Benni Mack uploaded patch set 3 05/08/15, 09:08

  12. Benni Mack voted on patch set 3 CR +1 V +1 05/08/15, 09:09

  13. Andreas Kienast voted on patch set 3 CR +2 V +2 05/08/15, 09:39

  14. Andreas Kienast merged patch set 3 05/08/15, 09:39