Unverified Commit 46bd90dc authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3097453 by longwave, JeroenT, Berdir, Wim Leers: Remove system.module BC layers

parent 5fca5fee
Loading
Loading
Loading
Loading
+3 −8
Changes for core/modules/system/src/Controller/AdminController.php: 3 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -21,15 +21,10 @@ class AdminController extends ControllerBase {
  /**
   * AdminController constructor.
   *
   * @param \Drupal\Core\Extension\ModuleExtensionList|null $extension_list_module
   *   The module extension list. This is left optional for BC reasons, but the
   *   optional usage is deprecated and will become required in Drupal 9.0.0.
   * @param \Drupal\Core\Extension\ModuleExtensionList $extension_list_module
   *   The module extension list.
   */
  public function __construct(ModuleExtensionList $extension_list_module = NULL) {
    if ($extension_list_module === NULL) {
      @trigger_error('Calling AdminController::__construct() with the $module_extension_list argument is supported in drupal:8.8.0 and will be required before drupal:9.0.0. See https://www.drupal.org/node/2709919.', E_USER_DEPRECATED);
      $extension_list_module = \Drupal::service('extension.list.module');
    }
  public function __construct(ModuleExtensionList $extension_list_module) {
    $this->moduleExtensionList = $extension_list_module;
  }

+1 −5
Changes for core/modules/system/src/FileDownloadController.php: 1 added line, 5 removed lines.
Original line number Diff line number Diff line
@@ -28,11 +28,7 @@ class FileDownloadController extends ControllerBase {
   * @param \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $streamWrapperManager
   *   The stream wrapper manager.
   */
  public function __construct(StreamWrapperManagerInterface $streamWrapperManager = NULL) {
    if (!$streamWrapperManager) {
      @trigger_error('Calling FileDownloadController::__construct() without the $streamWrapperManager argument is deprecated in drupal:8.8.0. The $streamWrapperManager argument will be required in drupal:9.0.0. See https://www.drupal.org/node/3035273', E_USER_DEPRECATED);
      $streamWrapperManager = \Drupal::service('stream_wrapper_manager');
    }
  public function __construct(StreamWrapperManagerInterface $streamWrapperManager) {
    $this->streamWrapperManager = $streamWrapperManager;
  }

+1 −5
Changes for core/modules/system/src/Form/FileSystemForm.php: 1 added line, 5 removed lines.
Original line number Diff line number Diff line
@@ -53,14 +53,10 @@ class FileSystemForm extends ConfigFormBase {
   * @param \Drupal\Core\File\FileSystemInterface $file_system
   *   The file system.
   */
  public function __construct(ConfigFactoryInterface $config_factory, DateFormatterInterface $date_formatter, StreamWrapperManagerInterface $stream_wrapper_manager, FileSystemInterface $file_system = NULL) {
  public function __construct(ConfigFactoryInterface $config_factory, DateFormatterInterface $date_formatter, StreamWrapperManagerInterface $stream_wrapper_manager, FileSystemInterface $file_system) {
    parent::__construct($config_factory);
    $this->dateFormatter = $date_formatter;
    $this->streamWrapperManager = $stream_wrapper_manager;
    if (!$file_system) {
      @trigger_error('Calling FileSystemForm::__construct() without the $file_system argument is deprecated in drupal:8.8.0. The $file_system argument will be required in drupal:9.0.0. See https://www.drupal.org/node/3039255', E_USER_DEPRECATED);
      $file_system = \Drupal::service('file_system');
    }
    $this->fileSystem = $file_system;
  }

+1 −5
Changes for core/modules/system/src/Form/ThemeSettingsForm.php: 1 added line, 5 removed lines.
Original line number Diff line number Diff line
@@ -82,17 +82,13 @@ class ThemeSettingsForm extends ConfigFormBase {
   * @param \Drupal\Core\File\FileSystemInterface $file_system
   *   The file system.
   */
  public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler, MimeTypeGuesserInterface $mime_type_guesser, ThemeManagerInterface $theme_manager, FileSystemInterface $file_system = NULL) {
  public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler, MimeTypeGuesserInterface $mime_type_guesser, ThemeManagerInterface $theme_manager, FileSystemInterface $file_system) {
    parent::__construct($config_factory);

    $this->moduleHandler = $module_handler;
    $this->themeHandler = $theme_handler;
    $this->mimeTypeGuesser = $mime_type_guesser;
    $this->themeManager = $theme_manager;
    if (!$file_system) {
      @trigger_error('The file_system service must be passed to ThemeSettingsForm::__construct(), it is required before Drupal 9.0.0. See https://www.drupal.org/node/3006851.', E_USER_DEPRECATED);
      $file_system = \Drupal::service('file_system');
    }
    $this->fileSystem = $file_system;
  }

+1 −5
Changes for core/modules/system/src/Plugin/Block/SystemMenuBlock.php: 1 added line, 5 removed lines.
Original line number Diff line number Diff line
@@ -54,13 +54,9 @@ class SystemMenuBlock extends BlockBase implements ContainerFactoryPluginInterfa
   * @param \Drupal\Core\Menu\MenuActiveTrailInterface $menu_active_trail
   *   The active menu trail service.
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition, MenuLinkTreeInterface $menu_tree, MenuActiveTrailInterface $menu_active_trail = NULL) {
  public function __construct(array $configuration, $plugin_id, $plugin_definition, MenuLinkTreeInterface $menu_tree, MenuActiveTrailInterface $menu_active_trail) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->menuTree = $menu_tree;
    if ($menu_active_trail === NULL) {
      @trigger_error('The menu.active_trail service must be passed to SystemMenuBlock::__construct(), it is required before Drupal 9.0.0. See https://www.drupal.org/node/2669550.', E_USER_DEPRECATED);
      $menu_active_trail = \Drupal::service('menu.active_trail');
    }
    $this->menuActiveTrail = $menu_active_trail;
  }

Loading