Commit 841d8ef7 authored by Hemant Gupta's avatar Hemant Gupta Committed by Hemant Gupta
Browse files

Issue #3300681 by guptahemant: Update module for D10 readiness

parent a3f7f694
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
name: Comment approver
type: module
description: A module to allow adminstrators to automatically approve comments
core: 8.x
core_version_requirement: ^8 || ^9
core_version_requirement: ^9.3 || ^10
package: Comment approver
configure: comment_approver.comment_approver_settings

+2 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ function comment_approver_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    // Main module help for the comment_approver module.
    case 'help.page.comment_approver':
      $output = '<pre>' . file_get_contents(drupal_get_path('module', 'comment_approver') . '/README.md') . '</pre>';
      $output = '<pre>' . file_get_contents(\Drupal::service('extension.list.module')->getPath('comment_approver') . '/README.md') . '</pre>';
      return $output;

    default:
@@ -72,5 +72,5 @@ function _commment_approver_dispatch_event(string $event_name, CommentInterface

  // Get the event_dispatcher service and dispatch the event.
  $event_dispatcher = \Drupal::service('event_dispatcher');
  $event_dispatcher->dispatch($event_name, $event);
  $event_dispatcher->dispatch($event, $event_name);
}
+1 −1
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@

namespace Drupal\comment_approver\Event;

use Symfony\Contracts\EventDispatcher\Event;
use Drupal\comment\CommentInterface;
use Symfony\Component\EventDispatcher\Event;

/**
 * Event that is fired when comment approver approves / blocks a comment.
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ class LoadTest extends BrowserTestBase {
  /**
   * {@inheritdoc}
   */
  protected function setUp() {
  protected function setUp(): void {
    parent::setUp();
    $this->user = $this->drupalCreateUser(['administer site configuration']);
    $this->drupalLogin($this->user);