Commit 918f0837 authored by Steven Jones's avatar Steven Jones
Browse files

[#3553478] fix: Trait "Drush\Commands\AutowireTrait" not found in...

[#3553478] fix: Trait "Drush\Commands\AutowireTrait" not found in ViewsDataExportCommands.php on line 23

By: kreynen
By: steven jones
parent c5e18126
Loading
Loading
Loading
Loading
Loading
+17 −3
Original line number Diff line number Diff line
@@ -13,8 +13,8 @@ use Drupal\views\Views;
use Drupal\views_data_export\BatchProcessingAdapterDrush;
use Drupal\views_data_export\Plugin\views\display\DataExport;
use Drush\Attributes as CLI;
use Drush\Commands\AutowireTrait;
use Drush\Commands\DrushCommands;
use Psr\Container\ContainerInterface;
use Symfony\Component\HttpFoundation\Response;

/**
@@ -22,8 +22,6 @@ use Symfony\Component\HttpFoundation\Response;
 */
class ViewsDataExportCommands extends DrushCommands {

  use AutowireTrait;

  /**
   * Constructs a new ViewsDataExportCommands object.
   */
@@ -34,6 +32,22 @@ class ViewsDataExportCommands extends DrushCommands {
    parent::__construct();
  }

  /**
   * Instantiates a new instance of this class.
   *
   * @param \Psr\Container\ContainerInterface $container
   *   The service container this instance should use.
   *
   * @return static
   *   A new class instance.
   */
  public static function create(ContainerInterface $container): static {
    return new static(
      $container->get('file_system'),
      $container->get('account_switcher'),
    );
  }

  /**
   * Implements views_data_export command arguments validation.
   *