Commit 1255c994 authored by Maxime Roux's avatar Maxime Roux Committed by Stephen Mustgrave
Browse files

Issue #3417922: Drush 12 compatibility

parent 61b04be0
Loading
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
<?php

namespace Drupal\stage_file_proxy\Commands;
namespace Drupal\stage_file_proxy\Drush\Commands;

use Drupal\Component\DependencyInjection\ContainerInterface;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Database\Connection;
@@ -71,6 +72,19 @@ class StageFileProxyCommands extends DrushCommands {
    $this->root = $root;
  }

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container): self {
    return new static(
      $container->get('config.factory'),
      $container->get('database'),
      $container->get('stage_file_proxy.fetch_manager'),
      '%app.root%',
    );
  }


  /**
   * Download all managed files from the origin.
   *
+1 −1
Original line number Diff line number Diff line
services:
  stage_file_proxy.command:
    class: Drupal\stage_file_proxy\Commands\StageFileProxyCommands
    class: Drupal\stage_file_proxy\Drush\Commands\StageFileProxyCommands
    arguments:
      - '@config.factory'
      - '@database'
+13 −0
Original line number Diff line number Diff line
<?php

/**
 * @file
 * Post update functions for Stage File Proxy.
 */

/**
 * Move Drush commands to drush folder for 12.
 */
function stage_file_proxy_post_update_move_drush_folder(): void {
  // Empty update hook to clear cache.
}