From 66655964379aa0224a58dd6ca248ec4d47751b22 Mon Sep 17 00:00:00 2001 From: bjorn Date: Mon, 11 Mar 2024 10:55:03 +0100 Subject: [PATCH] Refactor old rules to new configuration object --- config/drupal-8/drupal-8.0-deprecations.php | 8 ++++---- config/drupal-8/drupal-8.7-deprecations.php | 4 ++-- config/drupal-8/drupal-8.8-deprecations.php | 10 +++++----- config/drupal-9/drupal-9.3-deprecations.php | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/config/drupal-8/drupal-8.0-deprecations.php b/config/drupal-8/drupal-8.0-deprecations.php index 9acf9045..ac787c6a 100644 --- a/config/drupal-8/drupal-8.0-deprecations.php +++ b/config/drupal-8/drupal-8.0-deprecations.php @@ -43,13 +43,13 @@ $rectorConfig->ruleWithConfiguration(FunctionToServiceRector::class, [ // https://www.drupal.org/node/2418133 - new FunctionToServiceConfiguration('drupal_realpath', 'file_system', 'realpath'), + new FunctionToServiceConfiguration('8.0.0', 'drupal_realpath', 'file_system', 'realpath'), // https://www.drupal.org/node/2912696 - new FunctionToServiceConfiguration('drupal_render', 'renderer', 'render'), + new FunctionToServiceConfiguration('8.0.0', 'drupal_render', 'renderer', 'render'), // https://www.drupal.org/node/2912696 - new FunctionToServiceConfiguration('drupal_render_root', 'renderer', 'renderRoot'), + new FunctionToServiceConfiguration('8.0.0', 'drupal_render_root', 'renderer', 'renderRoot'), // https://www.drupal.org/node/1876852 - new FunctionToServiceConfiguration('format_date', 'date.formatter', 'format'), + new FunctionToServiceConfiguration('8.0.0', 'format_date', 'date.formatter', 'format'), ]); $rectorConfig->rule(EntityInterfaceLinkRector::class); diff --git a/config/drupal-8/drupal-8.7-deprecations.php b/config/drupal-8/drupal-8.7-deprecations.php index e21f5eda..1942122b 100644 --- a/config/drupal-8/drupal-8.7-deprecations.php +++ b/config/drupal-8/drupal-8.7-deprecations.php @@ -15,9 +15,9 @@ }); $rectorConfig->ruleWithConfiguration(FunctionToServiceRector::class, [ // https://www.drupal.org/node/3006851 - new FunctionToServiceConfiguration('file_prepare_directory', 'file_system', 'prepareDirectory'), + new FunctionToServiceConfiguration('8.7.0', 'file_prepare_directory', 'file_system', 'prepareDirectory'), // https://www.drupal.org/node/3006851 - new FunctionToServiceConfiguration('file_unmanaged_save_data', 'file_system', 'saveData'), + new FunctionToServiceConfiguration('8.7.0', 'file_unmanaged_save_data', 'file_system', 'saveData'), ]); /** diff --git a/config/drupal-8/drupal-8.8-deprecations.php b/config/drupal-8/drupal-8.8-deprecations.php index 40360618..ad10ee45 100644 --- a/config/drupal-8/drupal-8.8-deprecations.php +++ b/config/drupal-8/drupal-8.8-deprecations.php @@ -30,15 +30,15 @@ $rectorConfig->ruleWithConfiguration(FunctionToServiceRector::class, [ // https://www.drupal.org/node/2835616 - new FunctionToServiceConfiguration('entity_get_display', 'entity_display.repository', 'getViewDisplay'), + new FunctionToServiceConfiguration('8.8.0', 'entity_get_display', 'entity_display.repository', 'getViewDisplay'), // https://www.drupal.org/node/2835616 - new FunctionToServiceConfiguration('entity_get_form_display', 'entity_display.repository', 'getFormDisplay'), + new FunctionToServiceConfiguration('8.8.0', 'entity_get_form_display', 'entity_display.repository', 'getFormDisplay'), // https://www.drupal.org/node/3039255 - new FunctionToServiceConfiguration('file_directory_temp', 'file_system', 'getTempDirectory'), + new FunctionToServiceConfiguration('8.8.0', 'file_directory_temp', 'file_system', 'getTempDirectory'), // https://www.drupal.org/node/3038437 - new FunctionToServiceConfiguration('file_scan_directory', 'file_system', 'scanDirectory'), + new FunctionToServiceConfiguration('8.8.0', 'file_scan_directory', 'file_system', 'scanDirectory'), // https://www.drupal.org/node/3035273 - new FunctionToServiceConfiguration('file_uri_target', 'stream_wrapper_manager', 'getTarget'), + new FunctionToServiceConfiguration('8.8.0', 'file_uri_target', 'stream_wrapper_manager', 'getTarget'), ]); $rectorConfig->ruleWithConfiguration(MethodToMethodWithCheckRector::class, [ diff --git a/config/drupal-9/drupal-9.3-deprecations.php b/config/drupal-9/drupal-9.3-deprecations.php index f93b1445..c51996a4 100644 --- a/config/drupal-9/drupal-9.3-deprecations.php +++ b/config/drupal-9/drupal-9.3-deprecations.php @@ -39,11 +39,11 @@ // Change record: https://www.drupal.org/node/3223520 $rectorConfig->ruleWithConfiguration(FunctionToServiceRector::class, [ - new FunctionToServiceConfiguration('file_copy', 'file.repository', 'copy'), - new FunctionToServiceConfiguration('file_move', 'file.repository', 'move'), - new FunctionToServiceConfiguration('file_save_data', 'file.repository', 'writeData'), + new FunctionToServiceConfiguration('9.3.0', 'file_copy', 'file.repository', 'copy'), + new FunctionToServiceConfiguration('9.3.0', 'file_move', 'file.repository', 'move'), + new FunctionToServiceConfiguration('9.3.0', 'file_save_data', 'file.repository', 'writeData'), // Change record: https://www.drupal.org/node/2939099 - new FunctionToServiceConfiguration('render', 'renderer', 'render'), + new FunctionToServiceConfiguration('9.3.0', 'render', 'renderer', 'render'), ]); // Change record: https://www.drupal.org/node/3223091.