Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Rules action "Trim flag" should be ported to Flag 8.x..
Comment | File | Size | Author |
---|---|---|---|
#3 | flag-2470645-3-trim_flag.patch | 4.24 KB | czigor |
Comments
Comment #1
czigor CreditAttribution: czigor at Pronovix commentedComment #2
czigor CreditAttribution: czigor at Pronovix commentedComment #3
czigor CreditAttribution: czigor at Pronovix commentedThis patch is without tests, I would like someone to confirm if the direction is right.
1. I readded the flag_trim_flag() function removed in a8a0aa5ead5d8e334b576314362ef6f279cf6216 as a method of the Flag entity.
2. As anonymous flaggings are not implemented yet in 8.x, I omitted it.
Comment #4
czigor CreditAttribution: czigor at Pronovix commentedComment #6
klausiI think that trailing comma in the annotation breaks the tests.
Comment #7
joachim CreditAttribution: joachim commentedI remember an issue was filed on Doctrine to allow trailing commas.
Comment #8
joachim CreditAttribution: joachim commentedThis probably belongs in the service rather than the flag class. Or at least, there's discussion going on at the moment about whether the flag/unflag() methods belong in the service of the flag class, and this should go in the same place.