Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrala committed Dec 18, 2023
1 parent ff33b93 commit 8910e6d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions docs/rules_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -715,15 +715,22 @@ Fixes deprecated `AssertLegacyTrait::getRawContent()` calls

<br>

### ModuleLoadInstallRector
### ModuleLoadRector

Fixes deprecated `module_load_install()` calls

- class: [`DrupalRector\Drupal9\Rector\Deprecation\ModuleLoadInstallRector`](../src/Drupal9/Rector/Deprecation/ModuleLoadInstallRector.php)
- class: [`DrupalRector\Drupal9\Rector\Deprecation\ModuleLoadRector`](../src/Drupal9/Rector/Deprecation/ModuleLoadRector.php)

```diff
-module_load_install('example');
+\Drupal\Core\Extension\ModuleHandler::loadInclude('example', 'install');
+\Drupal::moduleHandler()->loadInclude('example', 'install');
$type = 'install';
$module = 'example';
$name = 'name';
-module_load_include($type, $module, $name);
-module_load_include($type, $module);
+\Drupal::moduleHandler()->loadInclude($module, $type, $name);
+\Drupal::moduleHandler()->loadInclude($module, $type);
```

<br>
Expand Down

0 comments on commit 8910e6d

Please sign in to comment.