Skip to content
Snippets Groups Projects

Modernize Drush commands

3 files
+ 11
12
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -2,15 +2,19 @@
declare(strict_types=1);
namespace Drupal\scheduled_transitions\Commands;
namespace Drupal\scheduled_transitions\Drush\Commands;
use Drupal\scheduled_transitions\ScheduledTransitionsJobsInterface;
use Drush\Attributes as CLI;
use Drush\Commands\AutowireTrait;
use Drush\Commands\DrushCommands;
/**
* Drush command for Scheduled Transitions.
*/
class ScheduledTransitionsCommands extends DrushCommands {
final class ScheduledTransitionsCommands extends DrushCommands {
use AutowireTrait;
public function __construct(
protected ScheduledTransitionsJobsInterface $jobs,
@@ -19,10 +23,8 @@ class ScheduledTransitionsCommands extends DrushCommands {
/**
* Fills queue with crawler jobs.
*
* @command scheduled-transitions:queue-jobs
* @aliases sctr-jobs
*/
#[CLI\Command(name: 'scheduled-transitions:queue-jobs', aliases: ['sctr-jobs'])]
public function crawlJobCreator(): void {
$this->jobs->jobCreator();
$this->logger()->success(\dt('Scheduled transitions queued.'));
Loading