diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 91f3055e12c72a105b42424dd69e6afcb59b3508..778fe908ed27dfe3243ff8d6aa91e70810f8460a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,8 @@ # To test a Drupal 7 project, change the first include filename from .main.yml to .main-d7.yml include: - project: $_GITLAB_TEMPLATES_REPO - ref: $_GITLAB_TEMPLATES_REF + # Keep reference on 1.5.10 to support testing against actual current versions of Drupal. + ref: "1.5.10" file: - "/includes/include.drupalci.main.yml" - "/includes/include.drupalci.variables.yml" diff --git a/admin_toolbar.module b/admin_toolbar.module index 89197f1371b9b14c854e5077d06f489655f4ea0a..c1d7a53585b75c98dd7888d070a546990e969197 100644 --- a/admin_toolbar.module +++ b/admin_toolbar.module @@ -5,10 +5,10 @@ * This is the module to create a drop-down menu for the core toolbar. */ -use Drupal\admin_toolbar\Render\Element\AdminToolbar; use Drupal\Component\Utility\Html; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; +use Drupal\admin_toolbar\Render\Element\AdminToolbar; /** * Implements hook_toolbar_alter(). diff --git a/admin_toolbar_search/src/Controller/AdminToolbarSearchController.php b/admin_toolbar_search/src/Controller/AdminToolbarSearchController.php index f796ff3a57aafab04183800377e263574fe5df52..56f22604f2f42bb63d17b8a2b013e334ed736c26 100644 --- a/admin_toolbar_search/src/Controller/AdminToolbarSearchController.php +++ b/admin_toolbar_search/src/Controller/AdminToolbarSearchController.php @@ -2,8 +2,8 @@ namespace Drupal\admin_toolbar_search\Controller; -use Drupal\admin_toolbar_search\SearchLinks; use Drupal\Core\Controller\ControllerBase; +use Drupal\admin_toolbar_search\SearchLinks; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\JsonResponse; diff --git a/admin_toolbar_search/tests/src/FunctionalJavascript/AdminToolbarToolsSearchTest.php b/admin_toolbar_search/tests/src/FunctionalJavascript/AdminToolbarToolsSearchTest.php index b1bf1173efe728e92d215e97c19982c40000b8b3..e5b1bfab3f467ed0f44e496d3dab04caecdf5787 100644 --- a/admin_toolbar_search/tests/src/FunctionalJavascript/AdminToolbarToolsSearchTest.php +++ b/admin_toolbar_search/tests/src/FunctionalJavascript/AdminToolbarToolsSearchTest.php @@ -2,8 +2,8 @@ namespace Drupal\Tests\admin_toolbar_search\FunctionalJavascript; -use Drupal\media\Entity\MediaType; use Drupal\Tests\media\Traits\MediaTypeCreationTrait; +use Drupal\media\Entity\MediaType; /** * Test the functionality of admin toolbar search. diff --git a/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php b/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php index 69f4f419e1fef7856bbf28eeee961c389c09c7f8..baad5a9d7f4af2b2e10168ff9fc82dc9b6e02350 100644 --- a/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php +++ b/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php @@ -486,21 +486,25 @@ class ExtraLinks extends DeriverBase implements ContainerDeriverInterface { // If module Update Manager is enabled. if ($this->moduleHandler->moduleExists('update')) { - $links['update.module_install'] = [ - 'title' => $this->t('Install new module'), - 'route_name' => 'update.module_install', - 'parent' => 'system.modules_list', - ] + $base_plugin_definition; + if (version_compare(\Drupal::VERSION, '11.0.0', '<')) { + $links['update.module_install'] = [ + 'title' => $this->t('Install new module'), + 'route_name' => 'update.module_install', + 'parent' => 'system.modules_list', + ] + $base_plugin_definition; + } $links['update.module_update'] = [ 'title' => $this->t('Update'), 'route_name' => 'update.module_update', 'parent' => 'system.modules_list', ] + $base_plugin_definition; - $links['update.theme_install'] = [ - 'title' => $this->t('Install new theme'), - 'route_name' => 'update.theme_install', - 'parent' => 'system.themes_page', - ] + $base_plugin_definition; + if (version_compare(\Drupal::VERSION, '11.0.0', '<')) { + $links['update.theme_install'] = [ + 'title' => $this->t('Install new theme'), + 'route_name' => 'update.theme_install', + 'parent' => 'system.themes_page', + ] + $base_plugin_definition; + } $links['update.theme_update'] = [ 'title' => $this->t('Update'), 'route_name' => 'update.theme_update', diff --git a/tests/src/Functional/AdminToolbarToolsSortTest.php b/tests/src/Functional/AdminToolbarToolsSortTest.php index 4a54a79de1292f7c3f4d25831d2afd62d51ef9f2..e56935ebc60eaffdaf935b9f7cdbc5f4ce157718 100644 --- a/tests/src/Functional/AdminToolbarToolsSortTest.php +++ b/tests/src/Functional/AdminToolbarToolsSortTest.php @@ -2,9 +2,9 @@ namespace Drupal\Tests\admin_toolbar\Functional; +use Drupal\Tests\BrowserTestBase; use Drupal\media\Entity\MediaType; use Drupal\system\Entity\Menu; -use Drupal\Tests\BrowserTestBase; /** * Tests Admin Toolbar tools functionality.