Skip to content

Commit

Permalink
adding logger parameter to ModulerInstaller service (#483)
Browse files Browse the repository at this point in the history
* adding logger parameter to ModulerInstaller service

* services yaml fix

* require Drupal 10.1

* require Drupal 10.1
  • Loading branch information
jackrabbithanna committed May 20, 2024
1 parent 6c3d00d commit 37fabc1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion civicrm_entity.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CiviCRM Entity
type: module
description: 'Expose CiviCRM entities as Drupal entities.'
package: CiviCRM
core_version_requirement: ^10 || ^11
core_version_requirement: ^10.1 || ^11
dependencies:
- civicrm
- drupal:datetime
Expand Down
2 changes: 1 addition & 1 deletion civicrm_entity.services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
class: Drupal\civicrm_entity\ModuleInstaller
decorates: module_installer
public: true
arguments: ['@civicrm_entity.module_installer.inner', '%app.root%', '@module_handler', '@kernel', '@database', '@update.update_hook_registry']
arguments: ['@civicrm_entity.module_installer.inner', '%app.root%', '@module_handler', '@kernel', '@database', '@update.update_hook_registry', '@logger.factory']
tags:
- { name: service_collector, tag: 'module_install.uninstall_validator', call: addUninstallValidator }

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "http://drupal.org/project/civicrm_entity",
"license": "GPL-2.0+",
"require": {
"drupal/core": "^10 || ^11",
"drupal/core": "^10.1 || ^11",
"civicrm/civicrm-drupal-8": "*"
},
"require-dev": {
Expand Down
6 changes: 4 additions & 2 deletions src/ModuleInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Drupal\Core\Extension\ModuleInstaller as ExtensionModuleInstaller;
use Drupal\Core\Extension\ModuleInstallerInterface;
use Drupal\Core\Database\Connection;
use Drupal\Core\Logger\LoggerChannelFactory;
use Drupal\Core\Update\UpdateHookRegistry;

/**
Expand All @@ -24,8 +25,9 @@ class ModuleInstaller extends ExtensionModuleInstaller {
/**
* {@inheritdoc}
*/
public function __construct(ModuleInstallerInterface $module_installer, $root, ModuleHandlerInterface $module_handler, DrupalKernelInterface $kernel, Connection $connection, UpdateHookRegistry $update_registry) {
parent::__construct($root, $module_handler, $kernel, $connection, $update_registry);
public function __construct(ModuleInstallerInterface $module_installer, $root, ModuleHandlerInterface $module_handler, DrupalKernelInterface $kernel, Connection $connection, UpdateHookRegistry $update_registry, LoggerChannelFactory $logger_factory) {
$logger = $logger_factory->get('civicrm_entity');
parent::__construct($root, $module_handler, $kernel, $connection, $update_registry, $logger);
$this->moduleInstaller = $module_installer;
}

Expand Down

0 comments on commit 37fabc1

Please sign in to comment.