From 99dbc7ff1e9ea7674b79a353acdb9788e648f92e Mon Sep 17 00:00:00 2001
From: catch <6915-catch@users.noreply.drupalcode.org>
Date: Mon, 22 Jul 2024 18:32:21 +0900
Subject: [PATCH] Issue #3417136 by dww, quietone, longwave, catch, xjm,
 lostcarpark, andypost, phenaproxima: Remove adding an extension via a URL

---
 core/lib/Drupal/Core/Extension/module.api.php |   5 +-
 core/lib/Drupal/Core/Updater/Module.php       |  33 ---
 core/lib/Drupal/Core/Updater/Theme.php        |  38 ---
 core/lib/Drupal/Core/Updater/Updater.php      |  15 +-
 .../Drupal/Core/Updater/UpdaterInterface.php  |   5 +
 core/modules/system/system.module             |  10 +-
 .../update/src/Form/UpdateManagerInstall.php  | 279 ------------------
 .../src/Routing/UpdateRouteSubscriber.php     |   3 -
 core/modules/update/src/UpdateManager.php     |   2 -
 .../update_test_new_module.1_1.xml            |  26 --
 .../FileTransferAuthorizeFormTest.php         |  87 ------
 .../tests/src/Functional/UpdateMiscTest.php   |  25 --
 .../tests/src/Functional/UpdateUploadTest.php | 211 -------------
 .../src/Functional/UpdateUploaderTestBase.php |  39 ---
 .../8.x-1.0/update_test_new_module.tar.gz     |   3 -
 .../8.x-1.0/update_test_new_module.zip        | Bin 832 -> 0 bytes
 .../8.x-1.1/update_test_new_module.tar.gz     |   3 -
 .../8.x-1.1/update_test_new_module.zip        | Bin 833 -> 0 bytes
 core/modules/update/update.authorize.inc      | 111 -------
 core/modules/update/update.links.action.yml   |  20 --
 core/modules/update/update.module             |   9 +-
 core/modules/update/update.routing.yml        |  24 --
 22 files changed, 23 insertions(+), 925 deletions(-)
 delete mode 100644 core/modules/update/src/Form/UpdateManagerInstall.php
 delete mode 100644 core/modules/update/tests/fixtures/release-history/update_test_new_module.1_1.xml
 delete mode 100644 core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php
 delete mode 100644 core/modules/update/tests/src/Functional/UpdateUploadTest.php
 delete mode 100644 core/modules/update/tests/src/Functional/UpdateUploaderTestBase.php
 delete mode 100644 core/modules/update/tests/update_test_new_module/8.x-1.0/update_test_new_module.tar.gz
 delete mode 100644 core/modules/update/tests/update_test_new_module/8.x-1.0/update_test_new_module.zip
 delete mode 100644 core/modules/update/tests/update_test_new_module/8.x-1.1/update_test_new_module.tar.gz
 delete mode 100644 core/modules/update/tests/update_test_new_module/8.x-1.1/update_test_new_module.zip
 delete mode 100644 core/modules/update/update.links.action.yml

diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php
index 9b62c48a99e6..65e912ba5640 100644
--- a/core/lib/Drupal/Core/Extension/module.api.php
+++ b/core/lib/Drupal/Core/Extension/module.api.php
@@ -986,7 +986,7 @@ function hook_update_last_removed() {
  *
  * Drupal\Core\Updater\Updater is a class that knows how to update various parts
  * of the Drupal file system, for example to update modules that have newer
- * releases, or to install a new theme.
+ * releases.
  *
  * @return array
  *   An associative array of information about the updater(s) being provided.
@@ -1026,8 +1026,7 @@ function hook_updater_info() {
  * Alter the Updater information array.
  *
  * An Updater is a class that knows how to update various parts of the Drupal
- * file system, for example to update modules that have newer releases, or to
- * install a new theme.
+ * file system, for example to update modules that have newer releases.
  *
  * @param array $updaters
  *   Associative array of updaters as defined through hook_updater_info().
diff --git a/core/lib/Drupal/Core/Updater/Module.php b/core/lib/Drupal/Core/Updater/Module.php
index a09f499c782c..6c2d58f3a499 100644
--- a/core/lib/Drupal/Core/Updater/Module.php
+++ b/core/lib/Drupal/Core/Updater/Module.php
@@ -2,8 +2,6 @@
 
 namespace Drupal\Core\Updater;
 
-use Drupal\Core\Url;
-
 /**
  * Defines a class for updating modules.
  *
@@ -76,37 +74,6 @@ public static function canUpdate($project_name) {
     return (bool) \Drupal::service('extension.list.module')->getPath($project_name);
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function postInstallTasks() {
-    // Since this is being called outside of the primary front controller,
-    // the base_url needs to be set explicitly to ensure that links are
-    // relative to the site root.
-    // @todo Simplify with https://www.drupal.org/node/2548095
-    $default_options = [
-      '#type' => 'link',
-      '#options' => [
-        'absolute' => TRUE,
-        'base_url' => $GLOBALS['base_url'],
-      ],
-    ];
-    return [
-      $default_options + [
-        '#url' => Url::fromRoute('update.module_install'),
-        '#title' => t('Add another module'),
-      ],
-      $default_options + [
-        '#url' => Url::fromRoute('system.modules_list'),
-        '#title' => t('Install newly added modules'),
-      ],
-      $default_options + [
-        '#url' => Url::fromRoute('system.admin'),
-        '#title' => t('Administration pages'),
-      ],
-    ];
-  }
-
   /**
    * {@inheritdoc}
    */
diff --git a/core/lib/Drupal/Core/Updater/Theme.php b/core/lib/Drupal/Core/Updater/Theme.php
index a3dfb872645d..32da14d8feba 100644
--- a/core/lib/Drupal/Core/Updater/Theme.php
+++ b/core/lib/Drupal/Core/Updater/Theme.php
@@ -2,8 +2,6 @@
 
 namespace Drupal\Core\Updater;
 
-use Drupal\Core\Url;
-
 /**
  * Defines a class for updating themes.
  *
@@ -77,40 +75,4 @@ public static function canUpdate($project_name) {
     return (bool) \Drupal::service('extension.list.theme')->getPath($project_name);
   }
 
-  /**
-   * {@inheritdoc}
-   */
-  public function postInstall() {
-    // Update the theme info.
-    clearstatcache();
-    \Drupal::service('extension.list.theme')->reset();
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function postInstallTasks() {
-    // Since this is being called outside of the primary front controller,
-    // the base_url needs to be set explicitly to ensure that links are
-    // relative to the site root.
-    // @todo Simplify with https://www.drupal.org/node/2548095
-    $default_options = [
-      '#type' => 'link',
-      '#options' => [
-        'absolute' => TRUE,
-        'base_url' => $GLOBALS['base_url'],
-      ],
-    ];
-    return [
-      $default_options + [
-        '#url' => Url::fromRoute('system.themes_page'),
-        '#title' => t('Install newly added themes'),
-      ],
-      $default_options + [
-        '#url' => Url::fromRoute('system.admin'),
-        '#title' => t('Administration pages'),
-      ],
-    ];
-  }
-
 }
diff --git a/core/lib/Drupal/Core/Updater/Updater.php b/core/lib/Drupal/Core/Updater/Updater.php
index 3e19e36ea334..ff9cd446da2d 100644
--- a/core/lib/Drupal/Core/Updater/Updater.php
+++ b/core/lib/Drupal/Core/Updater/Updater.php
@@ -290,6 +290,7 @@ public function update(&$filetransfer, $overrides = []) {
    * @throws \Drupal\Core\Updater\UpdaterFileTransferException
    */
   public function install(&$filetransfer, $overrides = []) {
+    @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3461934', E_USER_DEPRECATED);
     try {
       // Establish arguments with possible overrides.
       $args = $this->getInstallArgs($overrides);
@@ -399,16 +400,11 @@ public function getBackupDir() {
     return \Drupal::service('stream_wrapper_manager')->getViaScheme('temporary')->getDirectoryPath();
   }
 
-  /**
-   * Performs actions after new code is updated.
-   */
-  public function postUpdate() {
-  }
-
   /**
    * Performs actions after installation.
    */
   public function postInstall() {
+    @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3461934', E_USER_DEPRECATED);
   }
 
   /**
@@ -418,9 +414,16 @@ public function postInstall() {
    *   Links which provide actions to take after the install is finished.
    */
   public function postInstallTasks() {
+    @trigger_error(__METHOD__ . '() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3461934', E_USER_DEPRECATED);
     return [];
   }
 
+  /**
+   * Performs actions after new code is updated.
+   */
+  public function postUpdate() {
+  }
+
   /**
    * Returns an array of links to pages that should be visited post operation.
    *
diff --git a/core/lib/Drupal/Core/Updater/UpdaterInterface.php b/core/lib/Drupal/Core/Updater/UpdaterInterface.php
index 6e0bdaf32f9f..e925dd443306 100644
--- a/core/lib/Drupal/Core/Updater/UpdaterInterface.php
+++ b/core/lib/Drupal/Core/Updater/UpdaterInterface.php
@@ -58,6 +58,11 @@ public static function canUpdateDirectory($directory);
 
   /**
    * Actions to run after an install has occurred.
+   *
+   * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. There is no
+   *   replacement.
+   *
+   * @see https://www.drupal.org/node/3461934
    */
   public function postInstall();
 
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 230f08307710..98841512879f 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -119,7 +119,7 @@ function system_help($route_name, RouteMatchInterface $route_match) {
     case 'system.modules_list':
       $output = '<p>' . t('Add <a href=":modules">contributed modules</a> to extend your site\'s functionality.', [':modules' => 'https://www.drupal.org/project/modules']) . '</p>';
       if (!\Drupal::moduleHandler()->moduleExists('update')) {
-        $output .= '<p>' . t('Regularly review available updates and update as required to maintain a secure and current site. Always run the <a href=":update-php">update script</a> each time a module is updated. Install the <a href=":update-manager">Update Manager module</a> to update and add modules and themes.', [':update-php' => Url::fromRoute('system.db_update')->toString(), ':update-manager' => Url::fromRoute('system.modules_list', [], ['fragment' => 'module-update'])->toString()]) . '</p>';
+        $output .= '<p>' . t('Regularly review available updates and update as required to maintain a secure and current site. Always run the <a href=":update-php">update script</a> each time a module is updated. Install the <a href=":update-manager">Update Manager module</a> to update modules and themes.', [':update-php' => Url::fromRoute('system.db_update')->toString(), ':update-manager' => Url::fromRoute('system.modules_list', [], ['fragment' => 'module-update'])->toString()]) . '</p>';
       }
       return $output;
 
@@ -433,11 +433,11 @@ function template_preprocess_entity_add_list(&$variables) {
  *   system_authorized_init($callback, $file, $arguments, $page_title);
  *   return new RedirectResponse(system_authorized_get_url()->toString());
  * @endcode
- * Example (update_manager_install_form_submit()):
+ * Example (Drupal\update\Form\UpdateReady::submitForm()):
  * @code
- *  system_authorized_init('update_authorize_run_install',
- *    \Drupal::service('extension.list.module')->getPath('update') . '/update.authorize.inc',
- *    $arguments, t('Update manager'));
+ *  system_authorized_init('update_authorize_run_update',
+ *    __DIR__ . '/../../update.authorize.inc',
+ *    [$updates], $this->t('Update manager'));
  *  $form_state->setRedirectUrl(system_authorized_get_url());
  * @endcode
  *
diff --git a/core/modules/update/src/Form/UpdateManagerInstall.php b/core/modules/update/src/Form/UpdateManagerInstall.php
deleted file mode 100644
index bb851ddebd49..000000000000
--- a/core/modules/update/src/Form/UpdateManagerInstall.php
+++ /dev/null
@@ -1,279 +0,0 @@
-<?php
-
-namespace Drupal\update\Form;
-
-use Drupal\Core\Archiver\ArchiverManager;
-use Drupal\Core\Extension\ModuleHandlerInterface;
-use Drupal\Core\File\FileExists;
-use Drupal\Core\FileTransfer\Local;
-use Drupal\Core\Form\FormBase;
-use Drupal\Core\Form\FormStateInterface;
-use Drupal\Core\Updater\Updater;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\HttpFoundation\Response;
-
-/**
- * Configure update settings for this site.
- *
- * @internal
- */
-class UpdateManagerInstall extends FormBase {
-
-  /**
-   * The module handler.
-   *
-   * @var \Drupal\Core\Extension\ModuleHandlerInterface
-   */
-  protected $moduleHandler;
-
-  /**
-   * The root location under which installed projects will be saved.
-   *
-   * @var string
-   */
-  protected $root;
-
-  /**
-   * The site path.
-   *
-   * @var string
-   */
-  protected $sitePath;
-
-  /**
-   * The archiver plugin manager service.
-   *
-   * @var \Drupal\Core\Archiver\ArchiverManager
-   */
-  protected $archiverManager;
-
-  /**
-   * Constructs a new UpdateManagerInstall.
-   *
-   * @param string $root
-   *   The root location under which installed projects will be saved.
-   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
-   *   The module handler.
-   * @param string $site_path
-   *   The site path.
-   * @param \Drupal\Core\Archiver\ArchiverManager $archiver_manager
-   *   The archiver plugin manager service.
-   */
-  public function __construct($root, ModuleHandlerInterface $module_handler, $site_path, ArchiverManager $archiver_manager) {
-    $this->root = $root;
-    $this->moduleHandler = $module_handler;
-    $this->sitePath = $site_path;
-    $this->archiverManager = $archiver_manager;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getFormId() {
-    return 'update_manager_install_form';
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function create(ContainerInterface $container) {
-    return new static(
-      $container->get('update.root'),
-      $container->get('module_handler'),
-      $container->getParameter('site.path'),
-      $container->get('plugin.manager.archiver')
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function buildForm(array $form, FormStateInterface $form_state) {
-    $this->moduleHandler->loadInclude('update', 'inc', 'update.manager');
-    if (!_update_manager_check_backends($form, 'install')) {
-      return $form;
-    }
-
-    $form['help_text'] = [
-      '#prefix' => '<p>',
-      '#markup' => $this->t('You can find <a href=":module_url">modules</a> and <a href=":theme_url">themes</a> on <a href=":drupal_org_url">drupal.org</a>. The following file extensions are supported: %extensions.', [
-        ':module_url' => 'https://www.drupal.org/project/modules',
-        ':theme_url' => 'https://www.drupal.org/project/themes',
-        ':drupal_org_url' => 'https://www.drupal.org',
-        '%extensions' => $this->archiverManager->getExtensions(),
-      ]),
-      '#suffix' => '</p>',
-    ];
-
-    $form['project_url'] = [
-      '#type' => 'url',
-      '#title' => $this->t('Add from a URL'),
-      '#description' => $this->t('For example: %url', ['%url' => 'https://ftp.drupal.org/files/projects/name.tar.gz']),
-    ];
-
-    // Provide upload option only if file module exists.
-    if ($this->moduleHandler->moduleExists('file')) {
-      $form['information'] = [
-        '#prefix' => '<strong>',
-        '#markup' => $this->t('Or'),
-        '#suffix' => '</strong>',
-      ];
-
-      $form['project_upload'] = [
-        '#type' => 'file',
-        '#title' => $this->t('Upload a module or theme archive'),
-        '#description' => $this->t('For example: %filename from your local computer', ['%filename' => 'name.tar.gz']),
-      ];
-    }
-
-    $form['actions'] = ['#type' => 'actions'];
-    $form['actions']['submit'] = [
-      '#type' => 'submit',
-      '#button_type' => 'primary',
-      '#value' => $this->t('Continue'),
-    ];
-
-    return $form;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function validateForm(array &$form, FormStateInterface $form_state) {
-    $all_files = $this->getRequest()->files->get('files', []);
-    if ($this->moduleHandler->moduleExists('file')) {
-      if (!($form_state->getValue('project_url') xor !empty($all_files['project_upload']))) {
-        $form_state->setErrorByName('project_url', $this->t('You must either provide a URL or upload an archive file.'));
-      }
-    }
-    else {
-      if (!($form_state->getValue('project_url'))) {
-        $form_state->setErrorByName('project_url', $this->t('You must provide a URL to install.'));
-      }
-    }
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function submitForm(array &$form, FormStateInterface $form_state) {
-    $local_cache = NULL;
-    $all_files = $this->getRequest()->files->get('files', []);
-    if ($form_state->getValue('project_url')) {
-      $local_cache = update_manager_file_get($form_state->getValue('project_url'));
-      if (!$local_cache) {
-        $this->messenger()->addError($this->t('Unable to retrieve Drupal project from %url.', ['%url' => $form_state->getValue('project_url')]));
-        return;
-      }
-    }
-    elseif (!empty($all_files['project_upload']) && $this->moduleHandler->moduleExists('file')) {
-      $validators = ['FileExtension' => ['extensions' => $this->archiverManager->getExtensions()]];
-      if (!($finfo = file_save_upload('project_upload', $validators, NULL, 0, FileExists::Replace))) {
-        // Failed to upload the file. file_save_upload() calls
-        // \Drupal\Core\Messenger\MessengerInterface::addError() on failure.
-        return;
-      }
-      $local_cache = $finfo->getFileUri();
-    }
-
-    $directory = _update_manager_extract_directory();
-    try {
-      $archive = update_manager_archive_extract($local_cache, $directory);
-    }
-    catch (\Exception $e) {
-      $this->messenger()->addError($e->getMessage());
-      return;
-    }
-
-    $files = $archive->listContents();
-    if (!$files) {
-      $this->messenger()->addError($this->t('Provided archive contains no files.'));
-      return;
-    }
-
-    // Unfortunately, we can only use the directory name to determine the
-    // project name. Some archivers list the first file as the directory (i.e.,
-    // MODULE/) and others list an actual file (i.e., MODULE/README.TXT).
-    $project = strtok($files[0], '/\\');
-
-    $archive_errors = $this->moduleHandler->invokeAll('verify_update_archive', [$project, $local_cache, $directory]);
-    if (!empty($archive_errors)) {
-      $this->messenger()->addError(array_shift($archive_errors));
-      // @todo Fix me in D8: We need a way to set multiple errors on the same
-      //   form element and have all of them appear!
-      if (!empty($archive_errors)) {
-        foreach ($archive_errors as $error) {
-          $this->messenger()->addError($error);
-        }
-      }
-      return;
-    }
-
-    // Make sure the Updater registry is loaded.
-    drupal_get_updaters();
-
-    $project_location = $directory . '/' . $project;
-    try {
-      $updater = Updater::factory($project_location, $this->root);
-    }
-    catch (\Exception $e) {
-      $this->messenger()->addError($e->getMessage());
-      return;
-    }
-
-    try {
-      $project_title = Updater::getProjectTitle($project_location);
-    }
-    catch (\Exception $e) {
-      $this->messenger()->addError($e->getMessage());
-      return;
-    }
-
-    if (!$project_title) {
-      $this->messenger()->addError($this->t('Unable to determine %project name.', ['%project' => $project]));
-    }
-
-    if ($updater->isInstalled()) {
-      $this->messenger()->addError($this->t('%project is already present.', ['%project' => $project_title]));
-      return;
-    }
-
-    $project_real_location = \Drupal::service('file_system')->realpath($project_location);
-    $arguments = [
-      'project' => $project,
-      'updater_name' => get_class($updater),
-      'local_url' => $project_real_location,
-    ];
-
-    // This process is inherently difficult to test therefore use a state flag.
-    $test_authorize = FALSE;
-    if (drupal_valid_test_ua()) {
-      $test_authorize = \Drupal::state()->get('test_uploaders_via_prompt', FALSE);
-    }
-    // If the owner of the directory we extracted is the same as the owner of
-    // our configuration directory (e.g. sites/default) where we're trying to
-    // install the code, there's no need to prompt for FTP/SSH credentials.
-    // Instead, we instantiate a Drupal\Core\FileTransfer\Local and invoke
-    // update_authorize_run_install() directly.
-    if (fileowner($project_real_location) == fileowner($this->sitePath) && !$test_authorize) {
-      $this->moduleHandler->loadInclude('update', 'inc', 'update.authorize');
-      $filetransfer = new Local($this->root, \Drupal::service('file_system'));
-      $response = call_user_func_array('update_authorize_run_install', array_merge([$filetransfer], $arguments));
-      if ($response instanceof Response) {
-        $form_state->setResponse($response);
-      }
-    }
-
-    // Otherwise, go through the regular workflow to prompt for FTP/SSH
-    // credentials and invoke update_authorize_run_install() indirectly with
-    // whatever FileTransfer object authorize.php creates for us.
-    else {
-      // The page title must be passed here to ensure it is initially used when
-      // authorize.php loads for the first time with the FTP/SSH credentials
-      // form.
-      system_authorized_init('update_authorize_run_install', __DIR__ . '/../../update.authorize.inc', $arguments, $this->t('Update manager'));
-      $form_state->setRedirectUrl(system_authorized_get_url());
-    }
-  }
-
-}
diff --git a/core/modules/update/src/Routing/UpdateRouteSubscriber.php b/core/modules/update/src/Routing/UpdateRouteSubscriber.php
index 9bffe435f080..57ff5f456116 100644
--- a/core/modules/update/src/Routing/UpdateRouteSubscriber.php
+++ b/core/modules/update/src/Routing/UpdateRouteSubscriber.php
@@ -29,11 +29,8 @@ protected function alterRoutes(RouteCollection $collection) {
       return;
     }
     $routes = [
-      'update.report_install',
       'update.report_update',
-      'update.module_install',
       'update.module_update',
-      'update.theme_install',
       'update.theme_update',
       'update.confirmation_page',
     ];
diff --git a/core/modules/update/src/UpdateManager.php b/core/modules/update/src/UpdateManager.php
index 325bbc928c0a..19335e128558 100644
--- a/core/modules/update/src/UpdateManager.php
+++ b/core/modules/update/src/UpdateManager.php
@@ -182,10 +182,8 @@ public function projectStorage($key) {
       'system.modules_list',
       'system.theme_install',
       'update.module_update',
-      'update.module_install',
       'update.status',
       'update.report_update',
-      'update.report_install',
       'update.settings',
       'system.status',
       'update.manual_status',
diff --git a/core/modules/update/tests/fixtures/release-history/update_test_new_module.1_1.xml b/core/modules/update/tests/fixtures/release-history/update_test_new_module.1_1.xml
deleted file mode 100644
index d3c94e74cbd0..000000000000
--- a/core/modules/update/tests/fixtures/release-history/update_test_new_module.1_1.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<project xmlns:dc="http://purl.org/dc/elements/1.1/">
-<title>Update test new module</title>
-<short_name>update_test_new_module</short_name>
-<dc:creator>Drupal</dc:creator>
-<supported_branches>8.x-1.</supported_branches>
-<project_status>published</project_status>
-<link>http://example.com/project/update_test_new_module</link>
-  <terms>
-   <term><name>Projects</name><value>Modules</value></term>
-  </terms>
-<releases>
- <release>
-  <name>update_test_new_module 8.x-1.1</name>
-  <version>8.x-1.1</version>
-  <status>published</status>
-  <release_link>http://example.com/update_test_new_module-8-x-1-1-release</release_link>
-  <download_link>core/modules/update/tests/update_test_new_module/8.x-1.1/update_test_new_module.tar.gz</download_link>
-  <date>1300424521</date>
-  <terms>
-   <term><name>Release type</name><value>New features</value></term>
-   <term><name>Release type</name><value>Bug fixes</value></term>
-  </terms>
- </release>
-</releases>
-</project>
diff --git a/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php b/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php
deleted file mode 100644
index 57cf35414144..000000000000
--- a/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Drupal\Tests\update\Functional;
-
-/**
- * Tests the Update Manager module upload via authorize.php functionality.
- *
- * @group update
- */
-class FileTransferAuthorizeFormTest extends UpdateUploaderTestBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  protected $defaultTheme = 'stark';
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp(): void {
-    parent::setUp();
-    $admin_user = $this->drupalCreateUser([
-      'administer modules',
-      'administer software updates',
-    ]);
-    $this->drupalLogin($admin_user);
-
-    // Create a local cache so the module is not downloaded from drupal.org.
-    $cache_directory = _update_manager_cache_directory(TRUE);
-    foreach (['.tar.gz', '.zip'] as $extension) {
-      $filename = 'update_test_new_module' . $extension;
-      copy(
-        __DIR__ . '/../../update_test_new_module/8.x-1.0/' . $filename,
-        $cache_directory . '/' . $filename
-      );
-    }
-  }
-
-  /**
-   * Tests the Update Manager module upload via authorize.php functionality.
-   *
-   * @dataProvider archiveFileUrlProvider
-   */
-  public function testViaAuthorize($url): void {
-    // Ensure the that we can select which file transfer backend to use.
-    \Drupal::state()->set('test_uploaders_via_prompt', TRUE);
-
-    // Ensure the module does not already exist.
-    $this->drupalGet('admin/modules');
-    $this->assertSession()->pageTextNotContains('Update test new module');
-
-    $edit = [
-      'project_url' => $url,
-    ];
-    $this->drupalGet('admin/modules/install');
-    $this->submitForm($edit, 'Continue');
-    $edit = [
-      'connection_settings[authorize_filetransfer_default]' => 'system_test',
-      'connection_settings[system_test][update_test_username]' => $this->randomMachineName(),
-    ];
-    $this->submitForm($edit, 'Continue');
-    $this->assertSession()->pageTextContains('Files were added successfully.');
-
-    // Ensure the module is available to install.
-    $this->drupalGet('admin/modules');
-    $this->assertSession()->pageTextContains('Update test new module');
-  }
-
-  /**
-   * Data provider method for testViaAuthorize().
-   *
-   * Each of these release URLs has been cached in the setUp() method.
-   */
-  public static function archiveFileUrlProvider() {
-    return [
-      'tar.gz' => [
-        'url' => 'https://ftp.drupal.org/files/projects/update_test_new_module.tar.gz',
-      ],
-      'zip' => [
-        'url' => 'https://ftp.drupal.org/files/projects/update_test_new_module.zip',
-      ],
-    ];
-  }
-
-}
diff --git a/core/modules/update/tests/src/Functional/UpdateMiscTest.php b/core/modules/update/tests/src/Functional/UpdateMiscTest.php
index 13ffa7896b95..da1029cd6e0c 100644
--- a/core/modules/update/tests/src/Functional/UpdateMiscTest.php
+++ b/core/modules/update/tests/src/Functional/UpdateMiscTest.php
@@ -40,31 +40,6 @@ protected function setUp(): void {
     $this->drupalPlaceBlock('local_actions_block');
   }
 
-  /**
-   * Ensures that the local actions appear.
-   */
-  public function testLocalActions(): void {
-    $admin_user = $this->drupalCreateUser([
-      'administer site configuration',
-      'administer modules',
-      'administer software updates',
-      'administer themes',
-    ]);
-    $this->drupalLogin($admin_user);
-
-    $this->drupalGet('admin/modules');
-    $this->clickLink('Add new module');
-    $this->assertSession()->addressEquals('admin/modules/install');
-
-    $this->drupalGet('admin/appearance');
-    $this->clickLink('Add new theme');
-    $this->assertSession()->addressEquals('admin/theme/install');
-
-    $this->drupalGet('admin/reports/updates');
-    $this->clickLink('Add new module or theme');
-    $this->assertSession()->addressEquals('admin/reports/updates/install');
-  }
-
   /**
    * Checks that clearing the disk cache works.
    */
diff --git a/core/modules/update/tests/src/Functional/UpdateUploadTest.php b/core/modules/update/tests/src/Functional/UpdateUploadTest.php
deleted file mode 100644
index c6ef14240153..000000000000
--- a/core/modules/update/tests/src/Functional/UpdateUploadTest.php
+++ /dev/null
@@ -1,211 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Drupal\Tests\update\Functional;
-
-use Drupal\Core\Extension\InfoParserDynamic;
-use Drupal\Core\Updater\Updater;
-use Drupal\Core\Url;
-use Drupal\Tests\TestFileCreationTrait;
-
-/**
- * Tests the Update Manager module's upload and extraction functionality.
- *
- * @group update
- */
-class UpdateUploadTest extends UpdateUploaderTestBase {
-
-  use TestFileCreationTrait {
-    getTestFiles as drupalGetTestFiles;
-  }
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  protected static $modules = ['file'];
-
-  /**
-   * {@inheritdoc}
-   */
-  protected $defaultTheme = 'stark';
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp(): void {
-    parent::setUp();
-    $admin_user = $this->drupalCreateUser([
-      'administer modules',
-      'administer software updates',
-      'administer site configuration',
-    ]);
-    $this->drupalLogin($admin_user);
-  }
-
-  /**
-   * Tests upload, extraction, and update of a module.
-   */
-  public function testUploadModule(): void {
-    // Ensure that the update information is correct before testing.
-    update_get_available(TRUE);
-
-    // Images are not valid archives, so get one and try to install it. We
-    // need an extra variable to store the result of drupalGetTestFiles()
-    // since reset() takes an argument by reference and passing in a constant
-    // emits a notice in strict mode.
-    $imageTestFiles = $this->drupalGetTestFiles('image');
-    $invalidArchiveFile = reset($imageTestFiles);
-    $edit = [
-      'files[project_upload]' => $invalidArchiveFile->uri,
-    ];
-    // This also checks that the correct archive extensions are allowed.
-    $this->drupalGet('admin/modules/install');
-    $this->submitForm($edit, 'Continue');
-    $extensions = \Drupal::service('plugin.manager.archiver')->getExtensions();
-    $this->assertSession()->pageTextContains("Only files with the following extensions are allowed: $extensions.");
-    $this->assertSession()->addressEquals('admin/modules/install');
-
-    // Check to ensure an existing module can't be reinstalled. Also checks that
-    // the archive was extracted since we can't know if the module is already
-    // installed until after extraction.
-    $validArchiveFile = __DIR__ . '/../../aaa_update_test.tar.gz';
-    $edit = [
-      'files[project_upload]' => $validArchiveFile,
-    ];
-    $this->drupalGet('admin/modules/install');
-    $this->submitForm($edit, 'Continue');
-    $this->assertSession()->pageTextContains('AAA Update test is already present.');
-    $this->assertSession()->addressEquals('admin/modules/install');
-
-    // Ensure that a new module can be extracted and installed.
-    $updaters = drupal_get_updaters();
-    $moduleUpdater = $updaters['module']['class'];
-    $installedInfoFilePath = $this->container->get('update.root') . '/' . $moduleUpdater::getRootDirectoryRelativePath() . '/update_test_new_module/update_test_new_module.info.yml';
-    $this->assertFileDoesNotExist($installedInfoFilePath);
-    $validArchiveFile = __DIR__ . '/../../update_test_new_module/8.x-1.0/update_test_new_module.tar.gz';
-    $edit = [
-      'files[project_upload]' => $validArchiveFile,
-    ];
-    $this->drupalGet('admin/modules/install');
-    $this->submitForm($edit, 'Continue');
-    // Check that submitting the form takes the user to authorize.php.
-    $this->assertSession()->addressEquals('core/authorize.php');
-    $this->assertSession()->titleEquals('Update manager | Drupal');
-    // Check for a success message on the page, and check that the installed
-    // module now exists in the expected place in the filesystem.
-    $this->assertSession()->pageTextContains("Added / updated update_test_new_module successfully");
-    $this->assertFileExists($installedInfoFilePath);
-    // Ensure the links are relative to the site root and not
-    // core/authorize.php.
-    $this->assertSession()->linkExists('Add another module');
-    $this->assertSession()->linkByHrefExists(Url::fromRoute('update.module_install')->toString());
-    $this->assertSession()->linkExists('Install newly added modules');
-    $this->assertSession()->linkByHrefExists(Url::fromRoute('system.modules_list')->toString());
-    $this->assertSession()->linkExists('Administration pages');
-    $this->assertSession()->linkByHrefExists(Url::fromRoute('system.admin')->toString());
-    // Ensure we can reach the "Add another module" link.
-    $this->clickLink('Add another module');
-    $this->assertSession()->statusCodeEquals(200);
-    $this->assertSession()->addressEquals('admin/modules/install');
-
-    // Check that the module has the correct version before trying to update
-    // it. Since the module is installed in sites/simpletest, which only the
-    // child site has access to, standard module API functions won't find it
-    // when called here. To get the version, the info file must be parsed
-    // directly instead.
-    $info_parser = new InfoParserDynamic(DRUPAL_ROOT);
-    $info = $info_parser->parse($installedInfoFilePath);
-    $this->assertEquals('8.x-1.0', $info['version']);
-
-    // Install the module.
-    $this->drupalGet('admin/modules');
-    $this->submitForm(['modules[update_test_new_module][enable]' => TRUE], 'Install');
-
-    // Define the update XML such that the new module downloaded above needs an
-    // update from 8.x-1.0 to 8.x-1.1.
-    $this->mockInstalledExtensionsInfo([
-      'update_test_new_module' => [
-        'project' => 'update_test_new_module',
-      ],
-    ]);
-    $xml_mapping = [
-      'update_test_new_module' => '1_1',
-    ];
-    $this->refreshUpdateStatus($xml_mapping);
-
-    // Run the updates for the new module.
-    $this->drupalGet('admin/reports/updates/update');
-    $this->submitForm(['projects[update_test_new_module]' => TRUE], 'Download these updates');
-    $this->submitForm(['maintenance_mode' => FALSE], 'Continue');
-    $this->assertSession()->pageTextContains('Update was completed successfully.');
-    $this->assertSession()->pageTextContains("Added / updated update_test_new_module successfully");
-
-    // Parse the info file again to check that the module has been updated to
-    // 8.x-1.1.
-    $info = $info_parser->parse($installedInfoFilePath);
-    $this->assertEquals('8.x-1.1', $info['version']);
-  }
-
-  /**
-   * Ensures that archiver extensions are properly merged in the UI.
-   */
-  public function testFileNameExtensionMerging(): void {
-    $this->drupalGet('admin/modules/install');
-    // Make sure the bogus extension supported by update_test.module is there.
-    $this->assertSession()->responseMatches('/file extensions are supported:.*update-test-extension/');
-    // Make sure it didn't clobber the first option from core.
-    $this->assertSession()->responseMatches('/file extensions are supported:.*tar/');
-  }
-
-  /**
-   * Checks the messages on update manager pages when missing a security update.
-   */
-  public function testUpdateManagerCoreSecurityUpdateMessages(): void {
-    $this->mockDefaultExtensionsInfo(['version' => '8.0.0']);
-    $this->mockReleaseHistory(['drupal' => '0.2-sec']);
-    $this->config('update.settings')
-      ->set('fetch.url', Url::fromRoute('update_test.update_test')->setAbsolute()->toString())
-      ->save();
-    // Initialize the update status.
-    $this->drupalGet('admin/reports/updates');
-
-    // Now, make sure none of the Update manager pages have duplicate messages
-    // about core missing a security update.
-
-    $this->drupalGet('admin/modules/install');
-    $this->assertSession()->pageTextNotContains('There is a security update available for your version of Drupal.');
-
-    $this->drupalGet('admin/modules/update');
-    $this->assertSession()->pageTextNotContains('There is a security update available for your version of Drupal.');
-
-    $this->drupalGet('admin/appearance/install');
-    $this->assertSession()->pageTextNotContains('There is a security update available for your version of Drupal.');
-
-    $this->drupalGet('admin/appearance/update');
-    $this->assertSession()->pageTextNotContains('There is a security update available for your version of Drupal.');
-
-    $this->drupalGet('admin/reports/updates/install');
-    $this->assertSession()->pageTextNotContains('There is a security update available for your version of Drupal.');
-
-    $this->drupalGet('admin/reports/updates/update');
-    $this->assertSession()->pageTextNotContains('There is a security update available for your version of Drupal.');
-
-    $this->drupalGet('admin/update/ready');
-    $this->assertSession()->pageTextNotContains('There is a security update available for your version of Drupal.');
-  }
-
-  /**
-   * Tests only an *.info.yml file are detected without supporting files.
-   */
-  public function testUpdateDirectory(): void {
-    $type = Updater::getUpdaterFromDirectory($this->root . '/core/modules/update/tests/modules/aaa_update_test');
-    $this->assertEquals('Drupal\\Core\\Updater\\Module', $type, 'Detected a Module');
-
-    $type = Updater::getUpdaterFromDirectory($this->root . '/core/modules/update/tests/themes/update_test_basetheme');
-    $this->assertEquals('Drupal\\Core\\Updater\\Theme', $type, 'Detected a Theme.');
-  }
-
-}
diff --git a/core/modules/update/tests/src/Functional/UpdateUploaderTestBase.php b/core/modules/update/tests/src/Functional/UpdateUploaderTestBase.php
deleted file mode 100644
index 07a84934c15d..000000000000
--- a/core/modules/update/tests/src/Functional/UpdateUploaderTestBase.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Drupal\Tests\update\Functional;
-
-use Drupal\Core\DrupalKernel;
-
-/**
- * Base test class for tests that test project upload functionality.
- */
-abstract class UpdateUploaderTestBase extends UpdateTestBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp(): void {
-    parent::setUp();
-
-    // Change the root path which Update Manager uses to install and update
-    // projects to be inside the testing site directory. See
-    // \Drupal\update\UpdateRootFactory::get() for equivalent changes to the
-    // test child site.
-    $request = \Drupal::request();
-    $update_root = $this->container->get('update.root') . '/' . DrupalKernel::findSitePath($request);
-    $this->container->get('update.root')->set($update_root);
-
-    // Create the directories within the root path within which the Update
-    // Manager will install projects.
-    foreach (drupal_get_updaters() as $updater_info) {
-      $updater = $updater_info['class'];
-      $install_directory = $update_root . '/' . $updater::getRootDirectoryRelativePath();
-      if (!is_dir($install_directory)) {
-        mkdir($install_directory);
-      }
-    }
-  }
-
-}
diff --git a/core/modules/update/tests/update_test_new_module/8.x-1.0/update_test_new_module.tar.gz b/core/modules/update/tests/update_test_new_module/8.x-1.0/update_test_new_module.tar.gz
deleted file mode 100644
index c05f6b2338d5..000000000000
--- a/core/modules/update/tests/update_test_new_module/8.x-1.0/update_test_new_module.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-‹�G¦]�íÔÑNÂ0`®û½[²ÄÑŽn5ÆD/|õzYXÁE¶Õ®Ux{Ë6Œ$€!A‰ú7ÚÑn=üsºÈ­Ê¬jmV«·¬j
-·PãÑ)1Æd’Ю¦}å1ëêå“$á‚K!Êx"™Ñä¤w±‡kmnü­äµ<t]^Te}`~xŽúK¸Ýýß=•õ¬‰VÕâ¸=üy¤Bìï,’íþÇ‚ÇbDÙ÷<ò¶Þÿ:¯Ô
»~Óu¿©ï7íû»Ò~ºÿF
-ÕNM©mÙÔþ'÷NëÆØa’ÎCûÍfd½XYÏ£€è|úœÏýBýyU¦íV¹Œ–<bdÚ•
£™Q/®4ªRµõû„9÷!ýaÇå¿/ÇîñUþ9›PxÉRKÎ}þ'©ˆ‘ÿŸp}£Ÿ4!ã0$4¤·³ÒçܸsUµúí!ÌtxQøC³®ü¥c¤��������������àÜÞE7„�(��
\ No newline at end of file
diff --git a/core/modules/update/tests/update_test_new_module/8.x-1.0/update_test_new_module.zip b/core/modules/update/tests/update_test_new_module/8.x-1.0/update_test_new_module.zip
deleted file mode 100644
index ad59b948e9005d878bf44fea322c9a9a4e66b57a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 832
zcmWIWW@h1H0D&h=i2+~+ln`f-VJIy~Ni0c?FG(#fiO)+dkI&6dDa}dM4-MgDVCL?P
zjxz@0(h6<{MwV}k3=AwF{Q*D&MSwI1*ue76kO}EPUONz*;WiMvJ$jjWY597UxjAtA
zR59(-?Q!I5Q4nBx|G8^t;iNU@kIk>J3rO+?CNdq~^}9OIrYv;V9?KQ(rW;M2G^ViF
z&aGgXT^^)RueVEY!<1()B4R!~HA;CV@O0{qmX4iaaYe`H#BXIX`<!-7NJ_g&|LB(x
ztH0S%e;c_G-qN=Wbo*ELOu`Z9C1)TuA=z7yPy~DGWa;A&ES}oDQU8R-gGZOHUwRaD
zA*jIP^chc9!x*pPVr|i)&%s{BL86yFb&Gffb$c6qz9j0z9VFx(B--UI<n7h{wZZG_
zPGBrBGRZOHidYGtvq3<B;VsA)xTBdB63rM<3^E*7Btr}bCI^Nkje)ogCm7{~?Z%7=
oWV<zhPQY%7K6YU}SiAsj2E_}8uUXkZfyE4j!9cUGgS^N900@rtumAu6

diff --git a/core/modules/update/tests/update_test_new_module/8.x-1.1/update_test_new_module.tar.gz b/core/modules/update/tests/update_test_new_module/8.x-1.1/update_test_new_module.tar.gz
deleted file mode 100644
index 3638c6fe7f26..000000000000
--- a/core/modules/update/tests/update_test_new_module/8.x-1.1/update_test_new_module.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-‹�Q¦]�íÔÑNÂ0`®û½[²ÄÑŽn5ÆD/|õzYXÁE¶Õ®Ux{Ë6Œ$€!A‰ú7ÚÑn=üsºÈ­Ê¬jmV«·¬j
-·PãÑ)1Æd’Ю¦}å1ëêå“$á‚K!Êx"™Ñä¤w±‡kmnü­äµ<t]^Te}`~xŽúK¸Ýýß=•õ¬‰VÕâ¸=üy¤Bìï,’íþÇ‚ÇbDÙ÷<ò¶Þÿ:¯Ô
»~Óu¿©ï7íû»Ò~ºÿF
-ÕNM©mÙÔþ'÷NëÆØa’ÎCûÍfd½XYÏ£€è|úœÏýBýyU¦íV¹Œ–<âdÚ•
£™Q/®4ªRµõû„9÷!ýaÇå¿/ÇîñUþ9›PxÉRKÎ}þ'©ˆ‘ÿŸp}£Ÿ4!ã0$4¤·³ÒçܸsUµúí!ÌtxQøC³®ü¥c¤��������������àÜÞ,d7P�(��
\ No newline at end of file
diff --git a/core/modules/update/tests/update_test_new_module/8.x-1.1/update_test_new_module.zip b/core/modules/update/tests/update_test_new_module/8.x-1.1/update_test_new_module.zip
deleted file mode 100644
index 6daa04d85cf1bd66702f40a855b9d1698e3e2254..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 833
zcmWIWW@h1H009=}!~ie@N{BPaFq9UgB$lMcm!uY##OI}!$LHp!l;))BhlX%6Fnjby
z#{~g#X$3a}Bg;2Npa~%T0YC#qfHVi#K(ihGof$x0I}n@UHW0f#dYO4?`FfSPIdJ>@
zG40dsG2}a}Ai(mw`e<p0V^R7~>5cLY4|)Qa<~;D2bDv#$y7l6@DN4F4%*xz2T3013
z(m(d*)@+dz{k!G3WkREwyicr*pVw<CzEkzx&IIYHv*&D_uqW)mv3))77nUmg2v`}O
zdhK}fCE-7e2!H8Y2D<&LdnVxs^pi6Xn~>};NHBtZb+Ytv2o_&$-l%^<<H4g#*DpN^
zx)4<0ar%rWt6_{+aj~{&(dS^V;vmsWpSnf7g1WtpK3@`b;tmq>4ifG17V`G${@UR6
zbtf<y7@6dlamB0z(Agj$!0;C23*7O{3W;ZoI0hMxE0!UK1JeV;lEy&Xh7*i)!ggcE
p1hU<lKqp|gL?64b9xPsfHiO~?!`G~Apul1V!eF4;H$Yxw006P2^;`e|

diff --git a/core/modules/update/update.authorize.inc b/core/modules/update/update.authorize.inc
index 742a3f159e16..9be6690af407 100644
--- a/core/modules/update/update.authorize.inc
+++ b/core/modules/update/update.authorize.inc
@@ -62,54 +62,6 @@ function update_authorize_run_update($filetransfer, $projects) {
   return system_authorized_batch_process();
 }
 
-/**
- * Installs a new project when invoked by authorize.php.
- *
- * Callback for system_authorized_init() in
- * update_manager_install_form_submit().
- *
- * @param \Drupal\Core\FileTransfer\FileTransfer $filetransfer
- *   The FileTransfer object created by authorize.php for use during this
- *   operation.
- * @param string $project
- *   The canonical project short name; i.e., the name of the module, theme, or
- *   profile.
- * @param string $updater_name
- *   The name of the Drupal\Core\Updater\Updater class to use for installing
- *   this project.
- * @param string $local_url
- *   The URL to the locally installed temp directory where the project has
- *   already been downloaded and extracted into.
- *
- * @return \Symfony\Component\HttpFoundation\Response|null
- *   The result of processing the batch that installs the project. If this is
- *   an instance of \Symfony\Component\HttpFoundation\Response the calling code
- *   should use that response for the current page request.
- */
-function update_authorize_run_install($filetransfer, $project, $updater_name, $local_url) {
-  // @todo Instantiate our Updater to set the human-readable title?
-  $batch_builder = (new BatchBuilder())
-    ->setFile(\Drupal::service('extension.list.module')->getPath('update') . '/update.authorize.inc')
-    ->setInitMessage(t('Preparing to install'))
-    ->addOperation('update_authorize_batch_copy_project', [
-      $project,
-      $updater_name,
-      $local_url,
-      $filetransfer,
-    ])
-    // @todo Use a different finished callback for different messages?
-    ->setFinishCallback('update_authorize_install_batch_finished');
-  batch_set($batch_builder->toArray());
-
-  // Since authorize.php has its own method for setting the page title, set it
-  // manually here rather than passing it in to batch_set() as would normally
-  // be done.
-  \Drupal::request()->getSession()->set('authorize_page_title', t('Adding %project', ['%project' => $project]));
-
-  // Invoke the batch via authorize.php.
-  return system_authorized_batch_process();
-}
-
 /**
  * Implements callback_batch_operation().
  *
@@ -268,69 +220,6 @@ function update_authorize_update_batch_finished($success, $results) {
   $session->set('authorize_page_title', t('Update manager'));
 }
 
-/**
- * Implements callback_batch_finished().
- *
- * Performs actions when the authorized install batch is done.
- *
- * This processes the results and stashes them into SESSION such that
- * authorize.php will render a report. Also responsible for putting the site
- * back online after a successful install if necessary.
- *
- * @param $success
- *   TRUE if the batch operation was a success; FALSE if there were errors.
- * @param $results
- *   An associative array of results from the batch operation.
- */
-function update_authorize_install_batch_finished($success, $results) {
-  foreach ($results['log'] as $messages) {
-    if (!empty($messages['#abort'])) {
-      $success = FALSE;
-    }
-  }
-  $offline = \Drupal::state()->get('system.maintenance_mode');
-  $session = \Drupal::request()->getSession();
-  // Unset the variable since it is no longer needed.
-  $maintenance_mode = $session->remove('maintenance_mode');
-  if ($success) {
-    // Take the site out of maintenance mode if it was previously that way.
-    if ($offline && $maintenance_mode === FALSE) {
-      \Drupal::state()->set('system.maintenance_mode', FALSE);
-      $page_message = [
-        'message' => t('Files were added successfully. Your site has been taken out of maintenance mode.'),
-        'type' => 'status',
-      ];
-    }
-    else {
-      $page_message = [
-        'message' => t('Files were added successfully.'),
-        'type' => 'status',
-      ];
-    }
-  }
-  elseif (!$success && !$offline) {
-    $page_message = [
-      'message' => t('File add failed! See the log below for more information.'),
-      'type' => 'error',
-    ];
-  }
-  else {
-    $page_message = [
-      'message' => t('File add failed! See the log below for more information. Your site is still in maintenance mode.'),
-      'type' => 'error',
-    ];
-  }
-
-  // Set all these values into the SESSION so authorize.php can display them.
-  $session->set('authorize_results', [
-    'success' => $success,
-    'page_message' => $page_message,
-    'messages' => $results['log'],
-    'tasks' => $results['tasks'],
-  ]);
-  $session->set('authorize_page_title', t('Update manager'));
-}
-
 /**
  * Creates a structure of log messages.
  *
diff --git a/core/modules/update/update.links.action.yml b/core/modules/update/update.links.action.yml
deleted file mode 100644
index 9e66fbb8fb38..000000000000
--- a/core/modules/update/update.links.action.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-update.report_install:
-  route_name: update.report_install
-  title: 'Add new module or theme'
-  weight: 25
-  appears_on:
-    - update.status
-
-update.module_install:
-  route_name: update.module_install
-  title: 'Add new module'
-  weight: 25
-  appears_on:
-    - system.modules_list
-
-update.theme_install:
-  route_name: update.theme_install
-  title: 'Add new theme'
-  weight: 25
-  appears_on:
-    - system.themes_page
diff --git a/core/modules/update/update.module b/core/modules/update/update.module
index 3b6010b089b4..11c8fcb61357 100644
--- a/core/modules/update/update.module
+++ b/core/modules/update/update.module
@@ -7,8 +7,7 @@
  * The module checks for available updates of Drupal core and any installed
  * contributed modules and themes. It warns site administrators if newer
  * releases are available via the system status report (admin/reports/status),
- * the module and theme pages, and optionally via email. It also provides the
- * ability to install contributed modules and themes via a user interface.
+ * the module and theme pages, and optionally via email.
  */
 
 use Drupal\Core\File\Exception\FileException;
@@ -40,8 +39,6 @@ function update_help($route_name, RouteMatchInterface $route_match) {
       if (_update_manager_access()) {
         $output .= '<dt>' . t('Performing updates through the Update page') . '</dt>';
         $output .= '<dd>' . t('The Update Manager module allows administrators to perform updates directly from the <a href=":update-page">Update page</a>. It lists all available updates, and you can confirm whether you want to download them. If you don\'t have sufficient access rights to your web server, you could be prompted for your FTP/SSH password. Afterwards the files are transferred into your site installation, overwriting your old files. Direct links to the Update page are also displayed on the <a href=":modules_page">Extend page</a> and the <a href=":themes_page">Appearance page</a>.', [':modules_page' => Url::fromRoute('system.modules_list')->toString(), ':themes_page' => Url::fromRoute('system.themes_page')->toString(), ':update-page' => Url::fromRoute('update.report_update')->toString()]) . '</dd>';
-        $output .= '<dt>' . t('Adding new modules and themes through the Add new pages') . '</dt>';
-        $output .= '<dd>' . t('You can also add new modules and themes in the same fashion, through the <a href=":install">Add new modules and themes page</a>, or by clicking the <em>Add new module/theme</em> links at the top of the <a href=":modules_page">Extend page</a> and the <a href=":themes_page">Appearance page</a>. In this case, you are prompted to provide either the URL to the download, or to upload a packaged release file from your local computer.', [':modules_page' => Url::fromRoute('system.modules_list')->toString(), ':themes_page' => Url::fromRoute('system.themes_page')->toString(), ':install' => Url::fromRoute('update.report_install')->toString()]) . '</dd>';
       }
       $output .= '</dl>';
       return $output;
@@ -67,14 +64,12 @@ function update_page_top() {
     switch ($route_name) {
       // These pages don't need additional nagging.
       case 'update.theme_update':
-      case 'system.theme_install':
       case 'update.module_update':
-      case 'update.module_install':
       case 'update.status':
       case 'update.report_update':
-      case 'update.report_install':
       case 'update.settings':
       case 'system.status':
+      case 'system.theme_install':
       case 'update.confirmation_page':
       case 'system.batch_page.html':
         return;
diff --git a/core/modules/update/update.routing.yml b/core/modules/update/update.routing.yml
index 16adbe4a70b0..4f1f2888d6d3 100644
--- a/core/modules/update/update.routing.yml
+++ b/core/modules/update/update.routing.yml
@@ -23,14 +23,6 @@ update.manual_status:
     _permission: 'administer site configuration'
     _csrf_token: 'TRUE'
 
-update.report_install:
-  path: '/admin/reports/updates/install'
-  defaults:
-    _form: '\Drupal\update\Form\UpdateManagerInstall'
-    _title: 'Add new module or theme'
-  requirements:
-    _permission: 'administer software updates'
-
 update.report_update:
   path: '/admin/reports/updates/update'
   defaults:
@@ -39,14 +31,6 @@ update.report_update:
   requirements:
     _permission: 'administer software updates'
 
-update.module_install:
-  path: '/admin/modules/install'
-  defaults:
-    _form: '\Drupal\update\Form\UpdateManagerInstall'
-    _title: 'Add new module'
-  requirements:
-    _permission: 'administer software updates'
-
 update.module_update:
   path: '/admin/modules/update'
   defaults:
@@ -55,14 +39,6 @@ update.module_update:
   requirements:
     _permission: 'administer software updates'
 
-update.theme_install:
-  path: '/admin/theme/install'
-  defaults:
-    _form: '\Drupal\update\Form\UpdateManagerInstall'
-    _title: 'Add new theme'
-  requirements:
-    _permission: 'administer software updates'
-
 update.theme_update:
   path: '/admin/appearance/update'
   defaults:
-- 
GitLab