Problem/Motivation
The web/core/modules/node/src/Plugin/migrate/source/d6/Node.php did not get the constructor updated to use ModuleHandlerInterface instead of ModuleHandler
Steps to reproduce
This is likely triggered by the hook_event_dispatcher module being enabled as well.
Run migration and receive error:
[Exec] TypeError: Drupal\node\Plugin\migrate\source\d6\Node::__construct(): Argument #7 ($module_handler) must be of type Drupal\Core\Extension\ModuleHandler, Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler given, called in /code/web/modules/legacy/shop6_migrate/src/Plugin/migrate/source/ErpCore.php on line 38 in Drupal\node\Plugin\migrate\source\d6\Node->__construct() (line 81 of /code/web/core/modules/node/src/Plugin/migrate/source/d6/Node.php).
Proposed resolution
Update the constructor
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3314383.patch | 1.33 KB | singularo |
Comments
Comment #2
singularoComment #3
singularoComment #4
singularoNeed core directory.
Comment #5
cilefen commentedComment #6
dpiConstructor is changing which will break inheritance, needs a CR?
Patch looks good.
Comment #7
dpiHiding defective patch
Comment #9
dpiComment #10
smustgrave commentedRerunning tests. Though I'm 99% they were random failures.
Comment #11
smustgrave commentedAlso think this looks good but agree with @dpi this will need a change record.
Comment #12
smustgrave commented+1 RTBC for this issue
Putting to review for the change record which I primarily pulled from the description and title.
Comment #13
smustgrave commentedadded change record.
Comment #16
quietone commentedComment #17
quietone commentedThe Migrate Drupal Module was approved for removal in #3371229: [Policy] Migrate Drupal and Migrate Drupal UI after Drupal 7 EOL.
This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
The deprecation work is in #3522602: [meta] Tasks to remove Migrate Drupal module and the removal work in #3522602: [meta] Tasks to remove Migrate Drupal module.
Migrate Drupal will not be moved to a contributed project. It will be removed from core after the Drupal 12.x branch is open.
Comment #19
quietone commentedThis was fixed in #3512815: "core/modules/node/src/Plugin/migrate/source/d6/Node.php" "__construct" method uses variable of type "ModuleHandler" instead of "ModuleHandlerInterface", I have updated credit.