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.
Now we have moved to psr-0 and make heavy use of classes/namespaces etc... it would make sense to allow the 'worker calback' key in hook_queue_info to process any php callable and not just a function.
Comment | File | Size | Author |
---|---|---|---|
#7 | 1993100-7.patch | 1.85 KB | damiankloip |
#7 | interdiff-1993100-7.txt | 563 bytes | damiankloip |
#4 | 1993100-4.patch | 1.83 KB | damiankloip |
#4 | interdiff-1993100-4.txt | 1.14 KB | damiankloip |
d8.queue-info-callable.patch | 708 bytes | damiankloip | |
Comments
Comment #1
aspilicious CreditAttribution: aspilicious commentedMust come back green!
Comment #2
chx CreditAttribution: chx commentedAgreed.
Comment #3
alexpottWe should update the docs too then... in system.api.php...
Comment #4
damiankloip CreditAttribution: damiankloip commentedYep, good point. Let's update the actual docs.
Comment #5
damiankloip CreditAttribution: damiankloip commentedThis still applies fine, and is a really small change - any chance this can get in?
Comment #6
dawehnerOn views we had an issue with call_user_func on php 5.4, see #1933290: Saving anything on handlers isn't stored properly
so call_user_func_array should be used instead. In this case it works fine as data is an object, but for just arrays in the queue we have a problem
Comment #7
damiankloip CreditAttribution: damiankloip commentedThat's a very good point.
Comment #8
dawehnerLet's get that.
Comment #9
ParisLiakos CreditAttribution: ParisLiakos commenteddupe: #1972246: Allow a queue worker callback to be a class method
Comment #10
alexpottCommitted 5ecc704 and pushed to 8.x. Thanks!