diff --git a/core/modules/update/update.authorize.inc b/core/modules/update/update.authorize.inc index 6883f72071717b80be282599f7afe6cb85d0c885..303db3fc5c153f6aaf7783c90cbd4fc65f228089 100644 --- a/core/modules/update/update.authorize.inc +++ b/core/modules/update/update.authorize.inc @@ -5,6 +5,7 @@ */ use Drupal\Core\Batch\BatchBuilder; +use Drupal\Core\Hook\Attribute\StopProceduralHookScan; use Drupal\Core\Updater\UpdaterException; use Drupal\Core\Url; @@ -30,6 +31,7 @@ * an instance of \Symfony\Component\HttpFoundation\Response the calling code * should use that response for the current page request. */ +#[StopProceduralHookScan] function update_authorize_run_update($filetransfer, $projects) { $batch_builder = (new BatchBuilder()) ->setFile(\Drupal::service('extension.list.module')->getPath('update') . '/update.authorize.inc') diff --git a/core/modules/update/update.compare.inc b/core/modules/update/update.compare.inc index c5ca79e46ae3b9ed8ae9b32f5d568537150d43eb..545556e10ba95d6c3bfdef705a034d5ee725381b 100644 --- a/core/modules/update/update.compare.inc +++ b/core/modules/update/update.compare.inc @@ -5,6 +5,7 @@ */ use Drupal\Core\Extension\ExtensionVersion; +use Drupal\Core\Hook\Attribute\StopProceduralHookScan; use Drupal\Core\Utility\Error; use Drupal\update\ProjectRelease; use Drupal\update\UpdateFetcherInterface; @@ -22,6 +23,7 @@ * Array of project information from * \Drupal\update\UpdateManager::getProjects(). */ +#[StopProceduralHookScan] function update_process_project_info(&$projects) { foreach ($projects as $key => $project) { // Assume an official release until we see otherwise. diff --git a/core/modules/update/update.fetch.inc b/core/modules/update/update.fetch.inc index 0056bb8ea3e4ffb8244b929567454c1b582beb9a..063b9743b238d95eb58402d18650cf49407b563d 100644 --- a/core/modules/update/update.fetch.inc +++ b/core/modules/update/update.fetch.inc @@ -4,6 +4,7 @@ * @file */ +use Drupal\Core\Hook\Attribute\StopProceduralHookScan; use Drupal\update\UpdateManagerInterface; /** @@ -15,6 +16,7 @@ * * @see update_requirements() */ +#[StopProceduralHookScan] function _update_cron_notify() { $update_config = \Drupal::config('update.settings'); \Drupal::moduleHandler()->loadInclude('update', 'install'); diff --git a/core/modules/update/update.install b/core/modules/update/update.install index ad1f9bc20ee04d593345ed9a5eb9dcf5db7966ee..694fe84af710de0727816bf76b4976a576fedeb9 100644 --- a/core/modules/update/update.install +++ b/core/modules/update/update.install @@ -5,6 +5,7 @@ * Install, update, and uninstall functions for the Update Manager module. */ +use Drupal\Core\Hook\Attribute\StopProceduralHookScan; use Drupal\Core\Link; use Drupal\Core\Url; use Drupal\update\ProjectSecurityData; @@ -73,6 +74,7 @@ function update_requirements($phase) { /** * Implements hook_install(). */ +#[StopProceduralHookScan] function update_install(): void { $queue = \Drupal::queue('update_fetch_tasks', TRUE); $queue->createQueue(); diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc index ba3632e97e36cd8bcdbc90cd9a011b246089a963..8598e51b6c2f6e6ebf2222b72a79ad5a0fb479f6 100644 --- a/core/modules/update/update.manager.inc +++ b/core/modules/update/update.manager.inc @@ -7,6 +7,7 @@ use Drupal\Core\File\Exception\FileException; use Drupal\Core\File\Exception\InvalidStreamWrapperException; use Drupal\Core\File\FileExists; +use Drupal\Core\Hook\Attribute\StopProceduralHookScan; use Drupal\Core\Url; use Psr\Http\Client\ClientExceptionInterface; use Symfony\Component\HttpFoundation\RedirectResponse; @@ -19,6 +20,7 @@ * @param array $results * An associative array of results from the batch operation. */ +#[StopProceduralHookScan] function update_manager_download_batch_finished($success, $results) { if (!empty($results['errors'])) { $item_list = [ diff --git a/core/modules/update/update.module b/core/modules/update/update.module index 654ce8f37faf47862bf4024cd68e09bebda48a34..0ddab79fbfaf287686b69dc1a8cf471f13185a7f 100644 --- a/core/modules/update/update.module +++ b/core/modules/update/update.module @@ -5,6 +5,7 @@ */ use Drupal\Core\File\Exception\FileException; +use Drupal\Core\Hook\Attribute\StopProceduralHookScan; use Drupal\Core\Link; use Drupal\Core\Url; use Drupal\Core\Site\Settings; @@ -21,6 +22,7 @@ * TRUE if the current user can access the updater menu items; FALSE * otherwise. */ +#[StopProceduralHookScan] function _update_manager_access() { return Settings::get('allow_authorize_operations', TRUE) && \Drupal::currentUser()->hasPermission('administer software updates'); } diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc index 75957754bd870608434f020d07e9a2212e8b2d52..615e54b35b20a96074b6c53157b7c4563fda7b54 100644 --- a/core/modules/update/update.report.inc +++ b/core/modules/update/update.report.inc @@ -4,6 +4,7 @@ * @file */ +use Drupal\Core\Hook\Attribute\StopProceduralHookScan; use Drupal\Core\Template\Attribute; use Drupal\Core\Url; use Drupal\update\ProjectRelease; @@ -19,6 +20,7 @@ * An associative array containing: * - data: An array of data about each project's status. */ +#[StopProceduralHookScan] function template_preprocess_update_report(&$variables): void { $data = isset($variables['data']) && is_array($variables['data']) ? $variables['data'] : [];