Skip to content
Snippets Groups Projects

Issue #3418114: Drush 12 compatibility

2 files
+ 16
2
Compare changes
  • Side-by-side
  • Inline
Files
2
<?php
namespace Drupal\kafka\Commands;
namespace Drupal\kafka\Drush\Commands;
use Drupal\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Queue\QueueFactory;
use Drupal\kafka\ClientFactory;
use Drush\Commands\DrushCommands;
@@ -83,6 +84,19 @@ class KafkaCommands extends DrushCommands {
$this->lowLevelConsumer = $lowLevelConsumer;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container): self {
return new static(
$container->get('kafka.client_factory'),
$container->get('queue'),
$container->get('kafka.producer'),
$container->get('kafka.high_level_consumer'),
$container->get('kafka.low_level_consumer'),
);
}
/**
* Helper for high-level consumer: dump the partition list.
*
Loading