From 2606211b2ccab834232e3b9536da116dbe774b15 Mon Sep 17 00:00:00 2001 From: Lorenzo Del Pianta <lorenzo.del.pianta.perez@cern.ch> Date: Thu, 14 Sep 2023 11:28:43 +0200 Subject: [PATCH] replaced deprecated functions --- cern_integration.info.yml | 6 ++---- cern_integration.module | 5 +++-- composer.json | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cern_integration.info.yml b/cern_integration.info.yml index f65b30b..945a43b 100644 --- a/cern_integration.info.yml +++ b/cern_integration.info.yml @@ -2,8 +2,6 @@ name: CERN Integration module description: Custom functionality and constraints for CERN Drupal infrastructure package: CERN type: module -version: '8.0.9' -core: 8.x -core_version_requirement: ^8 || ^9 - +core_version_requirement: ^9 || ^10 +version: 2.0.0 required: TRUE diff --git a/cern_integration.module b/cern_integration.module index af48063..5542703 100644 --- a/cern_integration.module +++ b/cern_integration.module @@ -44,16 +44,17 @@ function cern_integration_update_projects_alter(&$projects) // Remove all centrally managed modules. foreach (\Drupal::service('extension.list.module')->getAllInstalledInfo() as $module_name => $module) { - if (preg_match('#^modules/#', drupal_get_path("module", $module_name))) { + if (preg_match('#^modules/#', \Drupal::service('extension.path.resolver')->getPath('module', $module_name))) { if (isset($module["project"])){ unset($projects[$module["project"]]); } } } + // Remove all centrally managed themes. foreach (\Drupal::service('extension.list.theme')->getAllInstalledInfo() as $theme_name => $theme) { - if (preg_match('#^themes/#', drupal_get_path("theme", $theme_name))) { + if (preg_match('#^themes/#', \Drupal::service('extension.list.theme')->getPath($theme_name))) { if (isset($theme["project"])){ unset($projects[$theme["project"]]); } diff --git a/composer.json b/composer.json index f256faf..dd402eb 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "drupal/cern-integration", "description": "Custom functionality and constraints for CERN Drupal infrastructure", - "version": "1.1.1", + "version": "2.0.0", "type": "drupal-custom-module", "license": "GPL-2.0-or-later", "authors": [ -- GitLab