Review main Merged

17571[FEATURE] Introduce service to handle multiple flash message queues

Alexander Schnitzler CR +2 V +2 Hard +426 −33 updated 10/02/13, 21:10

Commit message

Currently there is just one system wide flash message queue. This
unfortunetly leads to problems using flash messages in extbase as
one cannot address a subset of messages to a dedicated extension/
plugin/controller/action. To resolve this this patch introduces a
flash message service that handles multiple queues which falls
back to the known behaviour by default.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Wouter Wolters +1
    • Stefan Neufeind +1
    • Andreas Wolf +1
  • Verified V +2
    • Christian Kuhn +2
    • Wouter Wolters +1

Issues 1

Files 4

Review log 47

Show 22 earlier messages
  1. Mattias Nilsson commented on patch set 1 05/27/13, 17:19

    I would prefer that you didn't submit this

    FlashMessageQueue.php:174

    missing @return void
  2. Mr. Jenkins commented on patch set 1 05/27/13, 17:19

  3. Peter Niederlag commented on patch set 2 05/27/13, 17:19

    Looks good to me, but someone else must approve nice improvement!
  4. Andreas Wolf commented on patch set 2 05/27/13, 17:19

    Tested only the unit tests, did not construct some example application - but I think Alex will supply a test extension.
  5. Andreas Wolf commented on patch set 2 05/27/13, 17:19

    (3 inline comments) Replied to Alex' comments.
  6. Andreas Wolf commented on patch set 2 6 comments 05/27/13, 17:19

    Verified; Looks good to me, but someone else must approve All in all this looks good, commented on some small issues.
  7. Sebastian Michaelsen commented on patch set 2 05/27/13, 17:19

    (1 inline comment)
  8. Jigal van Hemert commented on patch set 2 05/27/13, 17:19

    Looks good to me, but someone else must approve Please provide a means (example ext) to see it in action.
  9. Mr. Jenkins commented on patch set 2 05/27/13, 17:19

  10. Alexander Schnitzler commented on patch set 2 05/27/13, 17:19

    Because I was told that there shouldn't be new static methods as they cannot be unit tested very well. Alos it's called a service and therefore its expected to be instantiated.

    FlashMessageQueue.php:63 Reply

    You mean "storeFlashMessagesInSession"? Can you please explain via im later?

    FlashMessageQueue.php:71 Reply

    The problem here is that you can only dequeue local flash messages and not the ones in the session whereas enqueue differentiates the flash message type. Also there is no need (yet) to dequeue something. But I am open to change this.

    FlashMessageQueue.php:193

    There are circumstances under which even an empty queue can be considered valid, so I changed the behaviour here to check for the queue not to be valid but not to be empty.

    FlashMessageQueue.php:194

    @Stefan Neufeind: Ich checked this one again. dequeue runs next internally, so I removed it.

    FlashMessageQueue.php:195 Reply

    Yes, you're right. Dequeue should call next in the background.

    FlashMessageQueue.php:204 Reply

    enqueue hasn't been part of the old api as this class didn't inherit SplQueue before.

    FlashMessageQueue.php:234 Reply

    Which one exactly? Some "method not found" Exception?

    FlashMessageQueue.php:235

    @Helmut: I hope you are fine with it. As this Exception only occurs if a user misuses the method I considered it to be a RuntimeException.

    FlashMessageQueue.php:236 Reply

    I dont't think so as these methods will exist natively in 6.3 as soon as the method names are "free" again and therefore they are not deprecated at all imo.

    FlashMessageQueueTest.php:47 Reply

    Have to rebase for this as this typo has also been in the class name itself.
  11. Alexander Schnitzler commented on patch set 2 05/27/13, 17:19

    Added some missing comments, the "@return void" and the DeprecationLog call.
  12. Alexander Schnitzler commented on patch set 2 05/27/13, 17:19

    (3 inline comments)
  13. Alexander Schnitzler uploaded patch set 2 05/27/13, 17:19

  14. Andreas Wolf commented on patch set 3 05/27/13, 17:19

    Verified; Looks good to me, but someone else must approve
  15. Andreas Wolf commented on patch set 4 05/27/13, 17:19

    Verified; Looks good to me, but someone else must approve Fixed a failing unit test (because of wrong class name).
  16. Andreas Wolf uploaded patch set 4 05/27/13, 17:19

  17. Stefan Neufeind commented on patch set 4 05/27/13, 17:19

    (4 inline comments)
  18. Stefan Neufeind commented on patch set 4 05/27/13, 17:19

    (3 inline comments)
  19. Helmut Hummel commented on patch set 4 05/27/13, 17:19

    (2 inline comments)
  20. Christian Kuhn commented on patch set 4 05/27/13, 17:19

    up. a extbase patch for this is also pending.
  21. Anja Leichsenring commented on patch set 4 05/27/13, 17:19

    some comments are still not solved. the pending extbase patch serves as replacement in case this one gets not merged.
  22. Mr. Jenkins commented on patch set 3 05/27/13, 17:19

  1. Mr. Jenkins commented on patch set 4 05/27/13, 17:19

  2. Alexander Schnitzler uploaded patch set 3 05/27/13, 17:19

  3. Alexander Schnitzler commented on patch set 3 05/27/13, 17:19

    An extension for testing this feature can be found here: https://github.com/alexanderschnitzler/Flashmessages
  4. Alexander Schnitzler commented on patch set 4 05/27/13, 17:19

    (1 inline comment)
  5. Alexander Schnitzler commented on patch set 4 05/27/13, 17:19

    (3 inline comments)
  6. Alexander Schnitzler commented on patch set 4 05/27/13, 17:19

    Rebased
  7. Mr. Jenkins commented on patch set 5 05/27/13, 17:19

  8. Andreas Wolf commented on patch set 7 05/27/13, 17:19

    Looks good to me, but someone else must approve Did not test it again, but there are only minor changes since my review. I only have some small nitpicks documentation-wise and regarding the exceptions used, that should not really stop us from merging this.
  9. Stefan Neufeind commented on patch set 7 05/27/13, 17:19

    Looks good to me, but someone else must approve
  10. Christian Kuhn uploaded patch set 7 05/27/13, 17:19

  11. Christian Kuhn commented on patch set 7 V 0 05/27/13, 17:19

    by team member; Looks good to me, approved
  12. Christian Kuhn commented on patch set 7 V 0 05/27/13, 17:19

    This looks good, imho. One thing that blocks me from merging is that I don't want to merge new deprecations (for the old methods) if they are still in use in the core .... So: We can get this in, if it is definatly taken care that the deprecations are fixed quickly (!) after this one here is in. Anyone want to sign this and take care?
  13. Christian Kuhn merged patch set 8 05/27/13, 17:19

  14. Anja Leichsenring commented on patch set 7 05/27/13, 17:19

    afaik Wouter is already on this.
  15. Anja Leichsenring commented on patch set 7 05/27/13, 17:19

    https://review.typo3.org/#/c/19225/ is the follow up ticket
  16. Mr. Jenkins commented on patch set 6 05/27/13, 17:19

  17. Mr. Jenkins commented on patch set 7 05/27/13, 17:19

  18. Alexander Schnitzler uploaded patch set 6 05/27/13, 17:19

  19. Alexander Schnitzler commented on patch set 6 05/27/13, 17:19

    (3 inline comments)
  20. Alexander Schnitzler commented on patch set 7 05/27/13, 17:19

    @Christian: I could provide such a patch. But next week at the earliest. Currently I am on vacation, so what about declaring the needed changes to be bugfixes and I will take care of them asap?
  21. Wouter Wolters commented on patch set 6 05/27/13, 17:19

    Looks good to me, but someone else must approve

    FlashMessageQueue.php:214

    As discussed it would be better if we set: @deprecated since 6.1 will be removed in two versions This is for all deprecations in this file
  22. Wouter Wolters commented on patch set 7 05/27/13, 17:19

    Verified; Looks good to me, but someone else must approve And for workspaces: https://review.typo3.org/19227
  23. Markus Klein commented on patch set 8 10/02/13, 20:30

    Did you remove the addMessage method on purpose back then??
  24. Markus Klein commented on patch set 8 10/02/13, 20:57

    Sorry, no breaking change. But insufficient deprecation. No log message, therefore no removal of this code.
  25. Alexander Schnitzler commented on patch set 8 10/02/13, 21:10

    As explained in the patchset you just provided it's not a real deprecation. It has to be removed but the actual methods need to stay implemented.