You are here

drupalmoduleupgrader.grep.yml in Drupal 7 to 8/9 Module Upgrader 8

config/install/drupalmoduleupgrader.grep.yml

File

config/install/drupalmoduleupgrader.grep.yml
View source
  1. # This file controls the behavior of the Grep converter
  2. # (Plugin/DMU/Converter/Grep.php). Grep is basically a dumb search
  3. # and replace.
  4. definitions:
  5. # Certain common global variables were turned into service methods in
  6. # Drupal 8. Any globals listed here will be expanded into three forms:
  7. # global $var, $GLOBALS['var'], and $GlOBALS["var"], and each form will
  8. # be replaced with the replacement string. For example, global $user
  9. # will become \Drupal::currentUser().
  10. globals:
  11. language: '\Drupal::languageManager()->getCurrentLanguage()'
  12. theme: '\Drupal::theme()->getActiveTheme()->getName()'
  13. theme_key: '\Drupal::theme()->getActiveTheme()->getName()'
  14. user: '\Drupal::currentUser()'
  15. # Many Drupal 7 API functions were moved into service objects, but otherwise
  16. # left untouched. Those functions are listed here. Each function name will
  17. # be expanded into function(), then replaced with its replacement. You should
  18. # NOT include the parentheses in the replacement string. For example,
  19. # drupal_alter('baz', $my_baz) will be replaced with:
  20. # \Drupal::moduleHandler()->alter('baz', $my_baz)
  21. function_calls:
  22. check_plain: '\Drupal\Component\Utility\Html::escape'
  23. conf_path: '\Drupal\Core\DrupalKernel::findSitePath'
  24. current_path: '\Drupal\Core\Url::fromRoute("<current>")->toString'
  25. decode_entities: '\Drupal\Component\Utility\Html::decodeEntities'
  26. drupal_alter: '\Drupal::moduleHandler()->alter'
  27. drupal_array_merge_deep: '\Drupal\Component\Utility\NestedArray::mergeDeep'
  28. drupal_array_merge_deep_array: '\Drupal\Component\Utility\NestedArray::mergeDeepArray'
  29. drupal_array_get_nested_value: '\Drupal\Component\Utility\NestedArray::getValue'
  30. drupal_array_set_nested_value: '\Drupal\Component\Utility\NestedArray::setValue'
  31. drupal_array_unset_nested_value: '\Drupal\Component\Utility\NestedArray::unsetValue'
  32. drupal_array_nested_key_exists: '\Drupal\Component\Utility\NestedArray::keyExists'
  33. drupal_basename: '\Drupal::service("file_system")->basename'
  34. drupal_build_form: '\Drupal::formBuilder()->buildForm'
  35. drupal_chmod: '\Drupal::service("file_system")->chmod'
  36. drupal_clean_css_identifier: '\Drupal\Component\Utility\Html::cleanCssIdentifier'
  37. drupal_clear_css_cache: '\Drupal::service("asset.css.collection_optimizer")->deleteAll'
  38. drupal_clear_js_cache: '\Drupal::service("asset.js.collection.optimizer")->deleteAll'
  39. drupal_convert_to_utf8: '\Drupal\Component\Utility\Unicode::convertToUtf8'
  40. drupal_cron_run: '\Drupal::service("cron")->run'
  41. drupal_dirname: '\Drupal::service("file_system")->dirname'
  42. drupal_encode_path: '\Drupal\Component\Utility\UrlHelper::encodePath'
  43. drupal_form_submit: '\Drupal::formBuilder()->submitForm'
  44. drupal_get_form: '\Drupal::formBuilder()->getForm'
  45. drupal_get_query_parameters: '\Drupal\Component\Utility\UrlHelper::filterQueryParameters'
  46. drupal_hash_base64: '\Drupal\Component\Utility\Crypt::hashBase64'
  47. drupal_hmac_base64: '\Drupal\Component\Utility\Crypt::hmacBase64'
  48. drupal_html_class: '\Drupal\Component\Utility\Html::getClass'
  49. drupal_html_id: '\Drupal\Component\Utility\Html::getId'
  50. drupal_json_encode: '\Drupal\Component\Serialization\Json::encode'
  51. drupal_json_decode: '\Drupal\Component\Serialization\Json::decode'
  52. drupal_mkdir: '\Drupal::service("file_system")->mkdir'
  53. drupal_move_uploaded_file: '\Drupal::service("file_system")->moveUploadedFile'
  54. drupal_parse_dependency: '\Drupal\Core\Extension\ModuleHandler::parseDependency'
  55. drupal_parse_url: '\Drupal\Component\Utility\UrlHelper::parse'
  56. drupal_prepare_form: '\Drupal::formBuilder()->prepareForm'
  57. drupal_process_form: '\Drupal::formBuilder()->processForm'
  58. drupal_random_bytes: '\Drupal\Component\Utility\Crypt::randomBytes'
  59. drupal_realpath: '\Drupal::service("file_system")->realpath'
  60. drupal_rebuild_form: '\Drupal::formBuilder()->rebuildForm'
  61. drupal_redirect_form: '\Drupal::formBuilder()->redirectForm'
  62. drupal_render: '\Drupal::service("renderer")->render'
  63. drupal_retrieve_form: '\Drupal::formBuilder()->retrieveForm'
  64. drupal_rmdir: '\Drupal::service("file_system")->rmdir'
  65. drupal_strlen: '\Drupal\Component\Utility\Unicode::strlen'
  66. drupal_strtolower: '\Drupal\Component\Utility\Unicode::strtolower'
  67. drupal_strtoupper: '\Drupal\Component\Utility\Unicode::strtoupper'
  68. drupal_substr: '\Drupal\Component\Utility\Unicode::substr'
  69. drupal_tempnam: '\Drupal::service("file_system")->tempnam'
  70. drupal_truncate_bytes: '\Drupal\Component\Utility\Unicode::truncateBytes'
  71. drupal_ucfirst: '\Drupal\Component\Utility\Unicode::ucfirst'
  72. drupal_unlink: '\Drupal::service("file_system")->unlink'
  73. drupal_valid_path: '\Drupal::service("path.validator")->isValid'
  74. drupal_validate_form: '\Drupal::service("form_validator")->validateForm'
  75. drupal_validate_utf8: '\Drupal\Component\Utility\Unicode::validateUtf8'
  76. drupal_var_export: '\Drupal\Component\Utility\Variable::export'
  77. element_child: '\Drupal\Core\Render\Element::child'
  78. element_children: '\Drupal\Core\Render\Element::children'
  79. element_get_visible_children: '\Drupal\Core\Render\Element::getVisibleChildren'
  80. element_properties: '\Drupal\Core\Render\Element::properties'
  81. element_property: '\Drupal\Core\Render\Element::property'
  82. element_set_attributes: '\Drupal\Core\Render\Element::setAttributes'
  83. entity_info_cache_clear: '\Drupal::entityManager()->clearCachedDefinitions'
  84. field_attach_create_bundle: '\Drupal::entityManager()->onBundleCreate'
  85. field_attach_delete_bundle: '\Drupal::entityManager()->onBundleDelete'
  86. field_attach_rename_bundle: '\Drupal::entityManager()->onBundleRename'
  87. field_cache_clear: '\Drupal::entityManager()->clearCachedFieldDefinitions'
  88. field_info_cache_clear: '\Drupal::entityManager()->clearCachedBundles'
  89. field_info_field_settings: '\Drupal::service("plugin.manager.field.field_type")->getDefaultSettings'
  90. field_info_formatter_settings: '\Drupal::service("plugin.manager.field.formatter")->getDefaultSettings'
  91. field_info_instance_settings: '\Drupal::service("plugin.manager.field.field_type")->getDefaultInstanceSettings'
  92. field_info_widget_settings: '\Drupal::service("plugin.manager.field.widget")->getDefaultSettings'
  93. file_get_stream_wrappers: '\Drupal::service("stream_wrapper_manager")->getWrappers'
  94. file_stream_wrapper_get_class: '\Drupal::service("stream_wrapper_manager")->getClass'
  95. file_stream_wrapper_get_instance_by_uri: '\Drupal::service("stream_wrapper_manager")->getViaUri'
  96. file_stream_wrapper_get_instance_by_scheme: '\Drupal::service("stream_wrapper_manager")->getViaScheme'
  97. file_stream_wrapper_valid_scheme: '\Drupal::service("file_system")->validScheme'
  98. file_uri_scheme: '\Drupal::service("file_system")->uriScheme'
  99. filter_xss: '\Drupal\Component\Utility\Xss::filter'
  100. filter_xss_admin: '\Drupal\Component\Utility\Xss::filterAdmin'
  101. filter_xss_bad_protocol: '\Drupal\Component\Utility\UrlHelper::filterBadProtocol'
  102. form_get_cache: '\Drupal::formBuilder()->getCache'
  103. form_set_cache: '\Drupal::formBuilder()->setCache'
  104. format_interval: '\Drupal::service("date.formatter")->formatInterval'
  105. format_plural: '\Drupal::translation()->formatPlural'
  106. image_dimensions_scale: '\Drupal\Component\Image\Image::scaleDimensions'
  107. ip_address: '\Drupal::request()->getClientIp'
  108. lock_acquire: '\Drupal::lock()->acquire'
  109. lock_release: '\Drupal::lock()->release'
  110. lock_release_all: '\Drupal::lock()->releaseAll'
  111. lock_wait: '\Drupal::lock()->wait'
  112. menu_get_object: '\Drupal::routeMatch()->getParameter'
  113. menu_tree_output: '\Drupal::menuTree()->build'
  114. mime_header_decode: '\Drupal\Component\Utility\Unicode::mimeHeaderDecode'
  115. mime_header_encode: '\Drupal\Component\Utility\Unicode::mimeHeaderEncode'
  116. _module_build_dependencies: '\Drupal::moduleHandler()->buildModuleDependencies'
  117. module_exists: '\Drupal::moduleHandler()->moduleExists'
  118. module_hook: '\Drupal::moduleHandler()->implementsHook'
  119. module_implements: '\Drupal::moduleHandler()->getImplementations'
  120. module_implements_reset: '\Drupal::moduleHandler()->resetImplementations'
  121. module_install: '\Drupal::moduleHandler()->install'
  122. module_load_all_includes: '\Drupal::moduleHandler()->loadAllIncludes'
  123. module_uninstall: '\Drupal::moduleHandler()->uninstall'
  124. path_to_theme: '\Drupal::theme()->getActiveTheme()->getPath'
  125. taxonomy_get_tree: '\Drupal::entityManager()->getStorage("taxonomy_term")->loadTree'
  126. taxonomy_get_vocabularies: '\Drupal\taxonomy\Entity\Vocabulary::loadMultiple'
  127. taxonomy_term_load: '\Drupal::entityManager()->getStorage("taxonomy_term")->load'
  128. taxonomy_term_load_children: '\Drupal::entityManager()->getStorage("taxonomy_term")->loadChildren'
  129. taxonomy_term_load_parents: '\Drupal::entityManager()->getStorage("taxonomy_term")->loadParents'
  130. taxonomy_term_load_parents_all: '\Drupal::entityManager()->getStorage("taxonomy_term")->loadParentsAll'
  131. token_find_with_prefix: '\Drupal::token()->findWithPrefix'
  132. token_info: '\Drupal::token()->getInfo'
  133. token_generate: '\Drupal::token()->generate'
  134. token_replace: '\Drupal::token()->replace'
  135. token_scan: '\Drupal::token()->scan'
  136. truncate_utf8: '\Drupal\Component\Utility\Unicode::truncate'
  137. unicode_check: '\Drupal\Component\Utility\Unicode::check'
  138. url_is_external: '\Drupal\Component\Utility\UrlHelper::isExternal'
  139. user_authenticate: '\Drupal::service("user.auth")->authenticate'
  140. user_is_anonymous: '\Drupal::currentUser()->isAnonymous'
  141. user_is_logged_in: '\Drupal::currentUser()->isAuthenticated'
  142. # Common global constants were generally moved into classes and interfaces.
  143. # Each listed constant is replaced literally (no pre-processing) with the
  144. # replacement string. So for example, $node->foo[LANGUAGE_NONE] will be
  145. # replaced with:
  146. # $node->foo[\Drupal\Core\Language\Language::LANGCODE_NOT_SPECIFIED]
  147. constants:
  148. CACHE_PERMANENT: '\Drupal\Core\Cache\Cache::PERMANENT'
  149. COMMENT_FORM_BELOW: '\Drupal\comment\Plugin\Field\FieldType\CommentItem::FORM_BELOW'
  150. COMMENT_FORM_SEPARATE_PAGE: '\Drupal\comment\Plugin\Field\FieldType\CommentItem::FORM_SEPARATE_PAGE'
  151. COMMENT_MODE_FLAT: '\Drupal\comment\CommentManagerInterface::COMMENT_MODE_FLAT'
  152. DRUPAL_ANONYMOUS_RID: '\Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE'
  153. DRUPAL_AUTHENTICATED_RID: '\Drupal\Core\Session\AccountInterface::AUTHENTICATED_RID'
  154. DRUPAL_ROOT: '\Drupal::root()'
  155. FILE_CHMOD_DIRECTORY: '\Drupal\Core\File\FileSystem::CHMOD_DIRECTORY'
  156. FILE_CHMOD_FILE: '\Drupal\Core\File\FileSystem::CHMOD_FILE'
  157. LANGUAGE_LTR: '\Drupal\Core\Language\Language::LANGUAGE_LTR'
  158. LANGUAGE_NONE: '\Drupal\Core\Language\Language::LANGCODE_NOT_SPECIFIED'
  159. LANGUAGE_RTL: '\Drupal\Core\Language\Language::LANGUAGE_RTL'
  160. PREG_CLASS_UNICODE_WORD_BOUNDARY: '\Drupal\Component\Utility\Unicode::PREG_CLASS_WORD_BOUNDARY'
  161. UNICODE_ERROR: '\Drupal\Component\Utility\Unicode::STATUS_ERROR'
  162. UNICODE_MULTIBYTE: '\Drupal\Component\Utility\Unicode::STATUS_MULTIBYTE'
  163. UNICODE_SINGLEBYTE: '\Drupal\Component\Utility\Unicode::STATUS_SINGLEBYTE'