diff -u b/core/includes/install.core.inc b/core/includes/install.core.inc --- b/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -1647,7 +1647,7 @@ $operations[] = array('locale_translation_batch_fetch_import', array('drupal', $language->getId(), array())); } - include_once(drupal_get_path('module', 'locale') . '/locale.fetch.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.fetch.inc'; $batch = array( 'operations' => $operations, 'title' => t('Updating translations.'), @@ -1696,7 +1696,7 @@ 'status' => 1, ); \Drupal::service('locale.project')->set($data['name'], $data); - include_once(drupal_get_path('module', 'locale') . '/locale.compare.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.compare.inc'; locale_translation_check_projects_local(array('drupal'), array($langcode)); } } diff -u b/core/includes/module.inc b/core/includes/module.inc --- b/core/includes/module.inc +++ b/core/includes/module.inc @@ -92,7 +92,7 @@ $path = drupal_get_path('module', $module) . "/$module.install"; if (file_exists($path)) { - include_once($path); + include_once $path; return TRUE; } return FALSE; diff -u b/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module --- b/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -386,7 +386,7 @@ } if ($field->isTranslatable()) { - include_once(drupal_get_path('module', 'content_translation') . '/content_translation.admin.inc'); + include_once drupal_get_path('module', 'content_translation') . '/content_translation.admin.inc'; $element = content_translation_field_sync_widget($field); if ($element) { $form['third_party_settings']['content_translation']['translation_sync'] = $element; @@ -533,7 +533,7 @@ * Implements hook_form_FORM_ID_alter() for language_content_settings_form(). */ function content_translation_form_language_content_settings_form_alter(array &$form, FormStateInterface $form_state) { - include_once(drupal_get_path('module', 'content_translation') . '/content_translation.admin.inc'); + include_once drupal_get_path('module', 'content_translation') . '/content_translation.admin.inc'; _content_translation_form_language_content_settings_form_alter($form, $form_state); } @@ -541,7 +541,7 @@ * Implements hook_preprocess_HOOK() for language-content-settings-table.html.twig. */ function content_translation_preprocess_language_content_settings_table(&$variables) { - include_once(drupal_get_path('module', 'content_translation') . '/content_translation.admin.inc'); + include_once drupal_get_path('module', 'content_translation') . '/content_translation.admin.inc'; _content_translation_preprocess_language_content_settings_table($variables); } diff -u b/core/modules/locale/locale.batch.inc b/core/modules/locale/locale.batch.inc --- b/core/modules/locale/locale.batch.inc +++ b/core/modules/locale/locale.batch.inc @@ -179,7 +179,7 @@ if (isset($source->type)) { if ($source->type == LOCALE_TRANSLATION_REMOTE || $source->type == LOCALE_TRANSLATION_LOCAL) { $file = $source->files[LOCALE_TRANSLATION_LOCAL]; - include_once(drupal_get_path('module', 'locale') . '/locale.bulk.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.bulk.inc'; $options += array( 'message' => t('Importing translation for %project.', array('%project' => $source->project)), ); @@ -214,7 +214,7 @@ * Batch results. */ function locale_translation_batch_fetch_finished($success, $results) { - include_once(drupal_get_path('module', 'locale') . '/locale.bulk.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.bulk.inc'; if ($success) { \Drupal::state()->set('locale.translation_last_checked', REQUEST_TIME); } diff -u b/core/modules/locale/locale.bulk.inc b/core/modules/locale/locale.bulk.inc --- b/core/modules/locale/locale.bulk.inc +++ b/core/modules/locale/locale.bulk.inc @@ -85,7 +85,7 @@ * An array of interface translation files keyed by their URI. */ function locale_translate_get_interface_translation_files(array $projects = array(), array $langcodes = array()) { - include_once(drupal_get_path('module', 'locale') . '/locale.compare.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.compare.inc'; $files = array(); $projects = $projects ? $projects : array_keys(locale_translation_get_projects()); $langcodes = $langcodes ? $langcodes : array_keys(locale_translatable_language_list()); diff -u b/core/modules/locale/locale.fetch.inc b/core/modules/locale/locale.fetch.inc --- b/core/modules/locale/locale.fetch.inc +++ b/core/modules/locale/locale.fetch.inc @@ -27,7 +27,7 @@ * Batch definition array. */ function locale_translation_batch_update_build($projects = array(), $langcodes = array(), $options = array()) { - include_once(drupal_get_path('module', 'locale') . '/locale.compare.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.compare.inc'; $projects = $projects ? $projects : array_keys(locale_translation_get_projects()); $langcodes = $langcodes ? $langcodes : array_keys(locale_translatable_language_list()); $status_options = $options; diff -u b/core/modules/locale/locale.module b/core/modules/locale/locale.module --- b/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -226,7 +226,7 @@ \Drupal::service('locale.storage')->deleteTranslations(array('language' => $language->id())); // Remove interface translation files. - include_once(drupal_get_path('module', 'locale') . '/locale.bulk.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.bulk.inc'; locale_translate_delete_translation_files(array(), array($language->id())); // Remove translated configuration objects. @@ -355,7 +355,7 @@ // and a translatable language was set. // Update tasks are added to the queue here but processed by Drupal's cron. if ($frequency = \Drupal::config('locale.settings')->get('translation.update_interval_days') && locale_translatable_language_list()) { - include_once(drupal_get_path('module', 'locale') . '/locale.translation.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.translation.inc'; locale_cron_fill_queue(); } } @@ -407,14 +407,14 @@ // built-in support for translation imports in the installer. if (!drupal_installation_attempted() && locale_translatable_language_list()) { if (\Drupal::config('locale.settings')->get('translation.import_enabled')) { - include_once(drupal_get_path('module', 'locale') . '/locale.compare.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.compare.inc'; // Update the list of translatable projects and start the import batch. // Only when new projects are added the update batch will be triggered. // Not each enabled module will introduce a new project. E.g. sub modules. $projects = array_keys(locale_translation_build_projects()); if ($list = array_intersect($list, $projects)) { - include_once(drupal_get_path('module', 'locale') . '/locale.fetch.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.fetch.inc'; // Get translation status of the projects, download and update // translations. $options = _locale_translation_default_update_options(); @@ -449,7 +449,7 @@ $components += array('module' => array(), 'theme' => array()); $list = array_merge($components['module'], $components['theme']); if ($language_list = locale_translatable_language_list()) { - include_once(drupal_get_path('module', 'locale') . '/locale.compare.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.compare.inc'; \Drupal::moduleHandler()->loadInclude('locale', 'bulk.inc'); // Only when projects are removed, the translation files and records will be @@ -882,7 +882,7 @@ function locale_translation_get_status($projects = NULL, $langcodes = NULL) { $result = array(); $status = \Drupal::state()->get('locale.translation_status'); - include_once(drupal_get_path('module', 'locale') . '/locale.translation.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.translation.inc'; $projects = $projects ? $projects : array_keys(locale_translation_get_projects()); $langcodes = $langcodes ? $langcodes : array_keys(locale_translatable_language_list()); @@ -922,7 +922,7 @@ // improve performance for large sites. // Load the translation status or build it if not already available. - include_once(drupal_get_path('module', 'locale') . '/locale.translation.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.translation.inc'; $status = locale_translation_get_status(); if (empty($status)) { $projects = locale_translation_get_projects(array($project)); diff -u b/core/modules/locale/locale.pages.inc b/core/modules/locale/locale.pages.inc --- b/core/modules/locale/locale.pages.inc +++ b/core/modules/locale/locale.pages.inc @@ -17,7 +17,7 @@ * @see locale_menu() */ function locale_translation_manual_status() { - include_once(drupal_get_path('module', 'locale') . '/locale.compare.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.compare.inc'; // Check the translation status of all translatable projects in all languages. // First we clear the cached list of projects. Although not strictly diff -u b/core/modules/locale/locale.translation.inc b/core/modules/locale/locale.translation.inc --- b/core/modules/locale/locale.translation.inc +++ b/core/modules/locale/locale.translation.inc @@ -61,7 +61,7 @@ // https://www.drupal.org/node/1777106 is a follow-up issue to make the // check for possible out-of-date project information more robust. if ($row_count == 0) { - include_once(drupal_get_path('module', 'locale') . '/locale.compare.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.compare.inc'; // At least the core project should be in the database, so we build the // data if none are found. locale_translation_build_projects(); @@ -352,7 +352,7 @@ // For each project+language combination a number of tasks are added to // the queue. if ($updates) { - include_once(drupal_get_path('module', 'locale') . '/locale.fetch.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.fetch.inc'; $options = _locale_translation_default_update_options(); $queue = \Drupal::queue('locale_translation', TRUE); diff -u b/core/modules/locale/src/Tests/LocaleUpdateTest.php b/core/modules/locale/src/Tests/LocaleUpdateTest.php --- b/core/modules/locale/src/Tests/LocaleUpdateTest.php +++ b/core/modules/locale/src/Tests/LocaleUpdateTest.php @@ -21,8 +21,8 @@ */ protected function setUp() { parent::setUp(); - include_once(drupal_get_path('module', 'locale') . '/locale.compare.inc'); - include_once(drupal_get_path('module', 'locale') . '/locale.fetch.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.compare.inc'; + include_once drupal_get_path('module', 'locale') . '/locale.fetch.inc'; $admin_user = $this->drupalCreateUser(array('administer modules', 'administer site configuration', 'administer languages', 'access administration pages', 'translate interface')); $this->drupalLogin($admin_user); // We use German as test language. This language must match the translation @@ -35,7 +35,7 @@ * Checks if a list of translatable projects gets build. */ public function testUpdateProjects() { - include_once(drupal_get_path('module', 'locale') . '/locale.compare.inc'); + include_once drupal_get_path('module', 'locale') . '/locale.compare.inc'; // Make the test modules look like a normal custom module. i.e. make the // modules not hidden. locale_test_system_info_alter() modifies the project diff -u b/core/modules/node/node.module b/core/modules/node/node.module --- b/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -690,13 +690,13 @@ $nids = \Drupal::entityQuery('node') ->condition('uid', $account->id()) ->execute(); - include_once(drupal_get_path('module', 'node') . '/node.admin.inc'); + include_once drupal_get_path('module', 'node') . '/node.admin.inc'; node_mass_update($nids, array('status' => 0), NULL, TRUE); break; case 'user_cancel_reassign': // Anonymize all of the nodes for this old account. - include_once(drupal_get_path('module', 'node') . '/node.admin.inc'); + include_once drupal_get_path('module', 'node') . '/node.admin.inc' ; $vids = \Drupal::entityManager()->getStorage('node')->userRevisionIds($account); node_mass_update($vids, array( 'uid' => 0, diff -u b/core/modules/tracker/src/Controller/TrackerPage.php b/core/modules/tracker/src/Controller/TrackerPage.php --- b/core/modules/tracker/src/Controller/TrackerPage.php +++ b/core/modules/tracker/src/Controller/TrackerPage.php @@ -18,7 +18,7 @@ * Content callback for the tracker.page route. */ public function getContent() { - include_once(drupal_get_path('module', 'tracker') . '/tracker.pages.inc'); + include_once drupal_get_path('module', 'tracker') . '/tracker.pages.inc' ; return tracker_page(); } } diff -u b/core/modules/tracker/src/Controller/TrackerUserRecent.php b/core/modules/tracker/src/Controller/TrackerUserRecent.php --- b/core/modules/tracker/src/Controller/TrackerUserRecent.php +++ b/core/modules/tracker/src/Controller/TrackerUserRecent.php @@ -19,7 +19,7 @@ * Content callback for the tracker.users_recent_content route. */ public function getContent(UserInterface $user) { - include_once(drupal_get_path('module', 'tracker') . '/tracker.pages.inc'); + include_once drupal_get_path('module', 'tracker') . '/tracker.pages.inc' ; return tracker_page($user); } } diff -u b/core/modules/tracker/src/Controller/TrackerUserTab.php b/core/modules/tracker/src/Controller/TrackerUserTab.php --- b/core/modules/tracker/src/Controller/TrackerUserTab.php +++ b/core/modules/tracker/src/Controller/TrackerUserTab.php @@ -19,7 +19,7 @@ * Content callback for the tracker.user_tab route. */ public function getContent(UserInterface $user) { - include_once(drupal_get_path('module', 'tracker') . '/tracker.pages.inc'); + include_once drupal_get_path('module', 'tracker') . '/tracker.pages.inc' ; return tracker_page($user); } diff -u b/core/modules/update/src/Tests/UpdateContribTest.php b/core/modules/update/src/Tests/UpdateContribTest.php --- b/core/modules/update/src/Tests/UpdateContribTest.php +++ b/core/modules/update/src/Tests/UpdateContribTest.php @@ -297,7 +297,7 @@ * Tests updates with a hidden base theme. */ function testUpdateHiddenBaseTheme() { - include_once(drupal_get_path('module', 'update') . '/update.compare.inc'); + include_once drupal_get_path('module', 'update') . '/update.compare.inc' ; // Install the subtheme. \Drupal::service('theme_handler')->install(array('update_test_subtheme')); diff -u b/core/modules/update/update.install b/core/modules/update/update.install --- b/core/modules/update/update.install +++ b/core/modules/update/update.install @@ -31,7 +31,7 @@ $requirements = array(); if ($phase == 'runtime') { if ($available = update_get_available(FALSE)) { - include_once(drupal_get_path('module', 'update') . '/update.compare.inc'); + include_once drupal_get_path('module', 'update') . '/update.compare.inc'; $data = update_calculate_project_data($available); // First, populate the requirements for core: $requirements['update_core'] = _update_requirement_check($data['drupal'], 'core'); diff -u b/core/modules/update/update.module b/core/modules/update/update.module --- b/core/modules/update/update.module +++ b/core/modules/update/update.module @@ -230,7 +230,7 @@ if ((REQUEST_TIME - $last_email_notice) > $interval) { // If configured time between notifications elapsed, send email about // updates possibly available. - include_once(drupal_get_path('module', 'update') . '/update.fetch.inc'); + include_once drupal_get_path('module', 'update') . '/update.fetch.inc'; _update_cron_notify(); } @@ -313,7 +313,7 @@ * @see \Drupal\Update\UpdateManager::getProjects() */ function update_get_available($refresh = FALSE) { - include_once(drupal_get_path('module', 'update') . '/update.compare.inc'); + include_once drupal_get_path('module', 'update') . '/update.compare.inc'; $needs_refresh = FALSE; // Grab whatever data we currently have. diff -u b/core/modules/user/user.api.php b/core/modules/user/user.api.php --- b/core/modules/user/user.api.php +++ b/core/modules/user/user.api.php @@ -40,7 +40,7 @@ switch ($method) { case 'user_cancel_block_unpublish': // Unpublish nodes (current revisions). - include_once(drupal_get_path('module', 'node') . '/node.admin.inc'); + include_once drupal_get_path('module', 'node') . '/node.admin.inc'; $nodes = \Drupal::entityQuery('node') ->condition('uid', $account->id()) ->execute(); @@ -49,7 +49,7 @@ case 'user_cancel_reassign': // Anonymize nodes (current revisions). - include_once(drupal_get_path('module', 'node') . '/node.admin.inc'); + include_once drupal_get_path('module', 'node') . '/node.admin.inc'; $nodes = \Drupal::entityQuery('node') ->condition('uid', $account->id()) ->execute(); diff -u b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php --- b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php +++ b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php @@ -588,7 +588,7 @@ * available). */ protected function buildFilters(&$form, FormStateInterface $form_state) { - include_once(drupal_get_path('module', 'views_ui') . '/admin.inc'); + include_once drupal_get_path('module', 'views_ui') . '/admin.inc'; $bundles = entity_get_bundles($this->entityTypeId); // If the current base table support bundles and has more than one (like user). @@ -893,7 +893,7 @@ // Figure out the table where $bundle_key lives. It may not be the same as // the base table for the view; the taxonomy vocabulary machine_name, for // example, is stored in taxonomy_vocabulary, not taxonomy_term_data. - include_once(drupal_get_path('module', 'views_ui') . '/admin.inc'); + include_once drupal_get_path('module', 'views_ui') . '/admin.inc'; $fields = Views::viewsDataHelper()->fetchFields($this->base_table, 'filter'); if (isset($fields[$this->base_table . '.' . $bundle_key])) { $table = $this->base_table; diff -u b/core/scripts/generate-d6-content.sh b/core/scripts/generate-d6-content.sh --- b/core/scripts/generate-d6-content.sh +++ b/core/scripts/generate-d6-content.sh @@ -96,7 +96,7 @@ $node_id = 0; $revision_id = 0; -include_once(drupal_get_path('module', 'node') . '/node.pages.inc'); +include_once drupal_get_path('module', 'node') . '/node.pages.inc'; for ($i = 0; $i < 24; $i++) { $uid = intval($i / 8) + 3; $user = user_load($uid); diff -u b/core/scripts/generate-d7-content.sh b/core/scripts/generate-d7-content.sh --- b/core/scripts/generate-d7-content.sh +++ b/core/scripts/generate-d7-content.sh @@ -158,7 +158,7 @@ } $node_id = 0; $revision_id = 0; -include_once(drupal_get_path('module', 'node') . '/node.pages.inc'); +include_once drupal_get_path('module', 'node') . '/node.pages.inc'; for ($i = 0; $i < 36; $i++) { $uid = intval($i / 8) + 3; $user = user_load($uid); only in patch2: unchanged: --- a/core/includes/update.inc +++ b/core/includes/update.inc @@ -235,7 +235,7 @@ function update_invoke_post_update($function, &$context) { } list($module, $name) = explode('_post_update_', $function, 2); - module_load_include('php', $module, $module . '.post_update'); + include_once drupal_get_path('module', $module) . '/' . $module . '.post_update.php'; if (function_exists($function)) { try { $ret['results']['query'] = $function($context['sandbox']); only in patch2: unchanged: --- a/core/modules/locale/src/Tests/LocaleUpdateDevelopmentReleaseTest.php +++ b/core/modules/locale/src/Tests/LocaleUpdateDevelopmentReleaseTest.php @@ -20,7 +20,7 @@ class LocaleUpdateDevelopmentReleaseTest extends WebTestBase { protected function setUp() { parent::setUp(); - module_load_include('compare.inc', 'locale'); + include_once drupal_get_path('module', 'locale') . '/locale.compare.inc'; $admin_user = $this->drupalCreateUser(array('administer modules', 'administer languages', 'access administration pages', 'translate interface')); $this->drupalLogin($admin_user); $this->drupalPostForm('admin/config/regional/language/add', array('predefined_langcode' => 'hu'), t('Add language')); only in patch2: unchanged: --- a/core/modules/system/src/Tests/Update/DbUpdatesTrait.php +++ b/core/modules/system/src/Tests/Update/DbUpdatesTrait.php @@ -53,7 +53,7 @@ protected function applyUpdates() { */ public static function includeUpdates($module, $group) { if ($index = \Drupal::state()->get($module . '.db_updates.' . $group)) { - module_load_include('inc', $module, 'update/' . $group . '_' . $index); + include_once drupal_get_path('module', $module) . '/update/' . $group . '_' . $index . '.inc'; } }