Commit 0419aaff authored by Luhur Abdi Rizal's avatar Luhur Abdi Rizal
Browse files

Issue #3281066 by el7cosmos: Require minimum Drupal core 9.3

parent f3507fe0
Loading
Loading
Loading
Loading
+2 −22
Original line number Diff line number Diff line
Description
-----------
This module dispatches events for several drupal core hooks. This allows you to
use the D8 Event Subscriber system instead of the outdated hook system to react
use the Drupal Event Subscriber system instead of the outdated hook system to react
on certain events. The module includes events for the most common hooks.

If you want to see new events registered, open an issue in the issue queue and
we will try to add it. Hopefully, in the near future, D8 core will put this
we will try to add it. Hopefully, in the near future, Drupal core will put this
into core.

Installation
@@ -22,23 +22,3 @@ Manual installation:
Examples
--------
You can find an example on how to use each Event in src/Example

Upgrading from 1.x to 2.x
------------------------
The 2.x version has been refactored to include several submodules that will
need to be enabled in addition to the main hook_event_dispatcher modules, in
order to use the events they expose. These currently include:

 - core_event_dispatcher
 - field_event_dispatcher
 - media_event_dispatcher
 - path_event_dispatcher
 - preprocess_event_dispatcher
 - toolbar_event_dispatcher
 - user_event_dispatcher
 - views_event_dispatcher
 - webform_event_dispatcher

For example, for Core hooks like THEME, the submodule of
'core_event_dispatcher' has to be enabled for the site to continue working
properly and the namespace of the used event will need to be updated.
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
        "source": "https://git.drupalcode.org/project/hook_event_dispatcher"
    },
    "require": {
        "drupal/core": "^9.2"
        "drupal/core": "^9.3"
    },
    "require-dev": {
        "drupal/eck": "^1.0@alpha",
+1 −1
Original line number Diff line number Diff line
name: Hook Event Dispatcher
type: module
description: Dispatches events for several drupal hooks
core_version_requirement: ^9.1
core_version_requirement: ^9.3
package: Hook events
+3 −1
Original line number Diff line number Diff line
@@ -12,7 +12,9 @@
 */
function hook_event_dispatcher_help(string $routeName) {
  if ($routeName === 'help.page.hook_event_dispatcher') {
    $path = drupal_get_path('module', 'hook_event_dispatcher');
    /** @var \Drupal\Core\Extension\ExtensionPathResolver $resolver */
    $resolver = \Drupal::service('extension.path.resolver');
    $path = $resolver->getPath('module', 'hook_event_dispatcher');
    $output = file_get_contents($path . '/README.md');
    return '<pre>' . $output . '</pre>';
  }
+1 −3
Original line number Diff line number Diff line
@@ -32,9 +32,7 @@ class FileUrlAlterEventTest extends KernelTestBase {
  ];

  /**
   * Test FileUrlAlterEvent for drupal core >= 9.3.x.
   *
   * @requires function \Drupal\Core\File\FileUrlGenerator::generateAbsoluteString
   * Test FileUrlAlterEvent.
   *
   * @throws \Exception
   */