Skip to content
Snippets Groups Projects
Commit a490771d authored by Tiago Siqueira's avatar Tiago Siqueira
Browse files

Issue #3320029: Make this module Drupal 9.4+ and PHP 8 compatible

parent 880e3bf5
No related branches found
No related tags found
1 merge request!9Issue #3320029: Make this module Drupal 9.4+ and PHP 8 compatible
......@@ -4,10 +4,10 @@
"description": "Social KPI (Lite).",
"homepage": "https://www.drupal.org/project/social_kpi_lite",
"require": {
"php": "^7.4",
"php": "^8.0",
"drupal/login_tracker": "^1.4",
"drupal/kpi_analytics": "^2.0",
"goalgorilla/open_social": "^11.1"
"drupal/kpi_analytics": "^3.0",
"goalgorilla/open_social": "^11.4"
},
"minimum-stability": "dev"
}
name: Social KPI Tag Followers
type: module
description: Social KPI submodule for showing tag followers block.
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9
dependencies:
- social_kpi_lite:social_kpi_lite
- social_follow_tag:social_follow_tag
......
......@@ -44,7 +44,7 @@ function _social_kpi_lite_tag_followers_get_blocks_list(): array {
* List of blocks.
*/
function _social_kpi_lite_tag_followers_create_blocks(array $blocks) {
$path = drupal_get_path('module', 'social_kpi_lite_tag_followers');
$path = \Drupal::service('extension.list.module')->getPath('social_kpi_lite_tag_followers');
$block_content_path = "{$path}/content/block_content";
/** @var \Drupal\kpi_analytics\BlockContentCreator $block_content_creator */
$block_content_creator = \Drupal::service('kpi_analytics.block_content_creator');
......@@ -62,7 +62,7 @@ function _social_kpi_lite_tag_followers_create_blocks(array $blocks) {
* List of blocks to delete.
*/
function _social_kpi_lite_tag_followers_delete_blocks(array $blocks) {
$path = drupal_get_path('module', 'social_kpi_lite_tag_followers');
$path = \Drupal::service('extension.list.module')->getPath('social_kpi_lite_tag_followers');
$block_content_path = "{$path}/content/block_content";
/** @var \Drupal\kpi_analytics\BlockContentCreator $block_content_creator */
$block_content_creator = \Drupal::service('kpi_analytics.block_content_creator');
......
name: Social KPI Taged Content
type: module
description: Social KPI submodule for showing a content with specific tags.
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9
package: Social
dependencies:
- social_tagging:social_tagging
......
......@@ -46,7 +46,7 @@ function _social_kpi_lite_tagged_content_get_blocks_list() {
* List of block IDs.
*/
function _social_kpi_lite_tagged_content_create_blocks(array $blocks) {
$path = drupal_get_path('module', 'social_kpi_lite_tagged_content');
$path = \Drupal::service('extension.list.module')->getPath('social_kpi_lite_tagged_content');
$block_content_path = "{$path}/content/block_content";
/** @var \Drupal\kpi_analytics\BlockContentCreator $block_content_creator */
$block_content_creator = Drupal::service('kpi_analytics.block_content_creator');
......@@ -65,7 +65,7 @@ function _social_kpi_lite_tagged_content_create_blocks(array $blocks) {
* List of block IDs.
*/
function _social_kpi_lite_tagged_delete_blocks(array $blocks) {
$path = drupal_get_path('module', 'social_kpi_lite_tagged_content');
$path = \Drupal::service('extension.list.module')->getPath('social_kpi_lite_tagged_content');
$block_content_path = "{$path}/content/block_content";
/** @var \Drupal\kpi_analytics\BlockContentCreator $block_content_creator */
$block_content_creator = \Drupal::service('kpi_analytics.block_content_creator');
......
name: Social KPI User Login
type: module
description: Social KPI submodule for showing user login data based on the login_tracker drupal.org module.
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9
package: Custom
dependencies:
- login_tracker
......
......@@ -34,7 +34,7 @@ function _social_kpi_lite_user_login_get_blocks_list() {
* Create block content.
*/
function _social_kpi_lite_user_login_create_blocks($blocks) {
$path = drupal_get_path('module', 'social_kpi_lite_user_login');
$path = \Drupal::service('extension.list.module')->getPath('social_kpi_lite_user_login');
$block_content_path = "{$path}/content/block_content";
$block_path = "{$path}/content/block";
/** @var \Drupal\kpi_analytics\BlockContentCreator $block_content_creator */
......@@ -53,7 +53,7 @@ function _social_kpi_lite_user_login_create_blocks($blocks) {
* Delete block content.
*/
function _social_kpi_lite_user_login_delete_blocks($blocks) {
$path = drupal_get_path('module', 'social_kpi_lite_user_login');
$path = \Drupal::service('extension.list.module')->getPath('social_kpi_lite_user_login');
$block_content_path = "{$path}/content/block_content";
$block_path = "{$path}/content/block";
......@@ -73,7 +73,7 @@ function _social_kpi_lite_user_login_delete_blocks($blocks) {
* Update User logins block content with the latest changes in yml file.
*/
function social_kpi_lite_user_login_update_8901() {
$path = drupal_get_path('module', 'social_kpi_lite_user_login');
$path = \Drupal::service('extension.list.module')->getPath('social_kpi_lite_user_login');
$block_content_path = "{$path}/content/block_content";
$block_id = 'social_kpi_lite_user_logins';
/** @var \Drupal\kpi_analytics\BlockContentCreator $block_content_creator */
......
......@@ -5,4 +5,4 @@ core_version_requirement: ^9
dependencies:
- kpi_analytics:kpi_analytics
package: Social
php: 7.4
php: 8.0
<?php
use Drupal\Core\Extension\ModuleInstallerInterface;
/**
* @file
* Social KPI Lite.
......@@ -42,7 +43,7 @@ function _social_kpi_lite_get_blocks_list() {
* Create block content.
*/
function _social_kpi_lite_create_blocks($blocks) {
$path = drupal_get_path('module', 'social_kpi_lite');
$path = \Drupal::service('extension.list.module')->getPath('social_kpi_lite');
$block_content_path = "{$path}/content/block_content";
$block_path = "{$path}/content/block";
/** @var \Drupal\kpi_analytics\BlockContentCreator $block_content_creator */
......@@ -61,7 +62,7 @@ function _social_kpi_lite_create_blocks($blocks) {
* Update block content.
*/
function _social_kpi_lite_update_blocks($blocks) {
$path = drupal_get_path('module', 'social_kpi_lite');
$path = \Drupal::service('extension.list.module')->getPath('social_kpi_lite');
$block_content_path = "{$path}/content/block_content";
/** @var \Drupal\kpi_analytics\BlockContentCreator $block_content_creator */
$block_content_creator = \Drupal::service('kpi_analytics.block_content_creator');
......@@ -76,7 +77,7 @@ function _social_kpi_lite_update_blocks($blocks) {
* Delete block content.
*/
function _social_kpi_lite_delete_blocks($blocks) {
$path = drupal_get_path('module', 'social_kpi_lite');
$path = \Drupal::service('extension.list.module')->getPath('social_kpi_lite');
$block_content_path = "{$path}/content/block_content";
$block_path = "{$path}/content/block";
......@@ -163,7 +164,7 @@ function social_kpi_lite_update_8004() {
*/
function social_kpi_lite_update_8901() {
$module_handler = \Drupal::moduleHandler();
/** @var \Drupal\Core\Extension\ModuleInstallerInterface $module_installer */
/** @var ModuleInstallerInterface $module_installer */
$module_installer = Drupal::service('module_installer');
if ($module_handler->moduleExists('social_kpi_light_tag_followers')) {
$module_installer->uninstall(['social_kpi_light_tag_followers']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment