Review main Merged

26445[BUGFIX] Add stdWrap on value property of TEXT

Markus Klein CR +2 V +2 Easy +8 −1 updated 02/01/14, 21:45

Commit message

As discussed back in 2010, the value property of the TEXT content object
should have stdWrap functionality as well, if the HTML content object
is deprecated.

Today the 6.0 TSref already mentions stdWrap for value and
the HTML cObject has been removed with 6.0 as well.

This fix now finally adds the stdWrap.

Review

  • Code review CR +2
    • Stefan Neufeind +2
    • Chris topher +1
    • Benni Mack +1
  • Verified V +2
    • Stefan Neufeind +2
    • Chris topher +1

Issues 1

Files 1

Review log 18

  1. Mr. Jenkins commented on patch set 1 12/16/13, 09:57

  2. Dmitry Dulepov commented on patch set 1 12/16/13, 12:29

    TEXT is itself a stdWrap, so I do not really see any value in this :( Example: 10 = TEXT 10.value = world 10.value.noTrimWrap = |Hello, |!| and 10 = TEXT 10.value = world 10.noTrimWrap = |Hello, |!| Those are equivalent. What's the point?
  3. Markus Klein commented on patch set 1 12/16/13, 15:03

    @Dmitry: I fully agree with you, but as described in the forge ticket, the documentation mentions stdWrap on value since 6.0 and the conclusion in the mailing list discussion was that it has been forgotten to add to the value property. Motto was "stdWrap for everything". Since it doesn't hurt here, I'd just add it and the user can choose where he wants to apply the stdWrap settings.
  4. Chris topher commented on patch set 1 12/16/13, 15:18

    Hi Markus, thanks for pushing this one! Markus is right; having stdWrap for "value" also leads to more consistency; after all stdWrap has been forgotten for this property.
  5. Chris topher voted on patch set 1 V +1 CR +1 12/16/13, 15:20

  6. Helmut Hummel commented on patch set 1 12/16/13, 17:13

    minor nitpick

    TextContentObject.php:47

    In which case does this make any sense? Is render called sometimes with something different than an array? If it's just a guard, I would prefer an array type hint in the method declaration or if that is not wanted for some reason throw an exeption if it's no array or (least preferable) do simply a typecast
  7. Markus Klein commented on patch set 1 12/16/13, 19:07

    TextContentObject.php:47 Reply

    Thx for your feedback Helmut. I transformed this only form the original code, where it did not make sense at all. First the is_array check and then a count() without a prior check... ? I remember that there is/was some reason why we can't use a typehint in the render methods. In order to not break any old code, I'd not throw an Exception here, but would just do the typecast. Is this ok from your side?
  8. Chris topher commented on patch set 1 01/23/14, 18:07

    ping
  9. Helmut Hummel commented on patch set 1 01/31/14, 14:22

    TextContentObject.php:45

    if (!is_array($conf)) { return ''; }
  10. Markus Klein uploaded patch set 2 02/01/14, 19:00

  11. Markus Klein commented on patch set 1 02/01/14, 19:00

    TextContentObject.php:45 Reply

    Done
  12. Benni Mack voted on patch set 2 CR +1 02/01/14, 19:04

  13. Chris topher voted on patch set 2 V +1 CR +1 02/01/14, 19:08

  14. Mr. Jenkins commented on patch set 2 02/01/14, 19:25

  15. Stefan Neufeind voted on patch set 2 V +2 CR +2 02/01/14, 21:44

  16. Stefan Neufeind merged patch set 3 02/01/14, 21:44

  17. Stefan Neufeind commented on patch set 3 02/01/14, 21:44

    Cherry Picked This patchset was cherry picked to change: I1b7068b3715bc9f8aa4608d5f746c16b70562f3b
  18. Stefan Neufeind commented on patch set 3 02/01/14, 21:45

    Cherry Picked This patchset was cherry picked to change: I1b7068b3715bc9f8aa4608d5f746c16b70562f3b