By longwave on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.2.x
Introduced in version:
10.2.5
Issue links:
Description:
Queue factory services must provide a get() method that returns a queue. This was previously not enforced by an interface contract, but you now need to implement \Drupal\Core\Queue\QueueFactoryInterface for your service to work as a queue factory in Drupal 11.
Previous code:
class MyQueueFactory {
public function get($name) {
return new MyQueue($name);
}
}
New code:
use Drupal\Core\Queue\QueueFactoryInterface;
class MyQueueFactory implements QueueFactoryInterface {
public function get($name) {
return new MyQueue($name);
}
}
Impacts:
Module developers