Problem/Motivation

Due to https://www.drupal.org/node/2549139, we need to fix some things.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#7 3052510-7.patch10.76 KBheddn
#5 3052510-5.patch10.86 KBheddn
#5 interdiff_2-5.txt2.62 KBheddn
#2 3052510.patch10.58 KBheddn
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

heddn created an issue. See original summary.

heddn’s picture

FileSize
10.58 KB
heddn’s picture

Status: Active » Needs review
mikelutz’s picture

  1. +++ b/src/Plugin/migrate/process/EntityGenerate.php
    @@ -67,42 +71,14 @@ class EntityGenerate extends EntityLookup {
    -  public function __construct(array $configuration, $pluginId, $pluginDefinition, MigrationInterface $migration, EntityManagerInterface $entityManager, SelectionPluginManagerInterface $selectionPluginManager, MigratePluginManager $processPluginManager) {
    -    parent::__construct($configuration, $pluginId, $pluginDefinition, $migration, $entityManager, $selectionPluginManager);
    -    $this->processPluginManager = $processPluginManager;
    -  }
    

    While I very much support this constructor change, It may be disruptive, as EntityGenerate is very often extended in custom code. It might be better to leave BC shim in for now and make this change in a 8.x-5.x branch

  2. +++ b/src/Plugin/migrate/process/EntityLookup.php
    @@ -142,14 +150,15 @@ class EntityLookup extends ProcessPluginBase implements ContainerFactoryPluginIn
    -  public function __construct(array $configuration, $pluginId, $pluginDefinition, MigrationInterface $migration, EntityManagerInterface $entityManager, SelectionPluginManagerInterface $selectionPluginManager) {
    +  public function __construct(array $configuration, $pluginId, $pluginDefinition, MigrationInterface $migration, EntityTypeManagerInterface $entityTypeManager, EntityFieldManagerInterface $entityFieldManager, SelectionPluginManagerInterface $selectionPluginManager) {
    

    switching to EntityTypeManagerInterface is okay, because EntityManagerInterface extends EntityTypeManagerInterface so this is a widening of acceptable parameters and not a BC break, but EntityFieldManagerInterface should be at the end and be nullable to prevent a BC break

heddn’s picture

FileSize
2.62 KB
10.86 KB

A 5.x branch is (probably) ok. Does this reduce the chance of further (future) BC breaking changes even more?

NickDickinsonWilde’s picture

I'd +1 on that being in a new 5.x branch; I do have around 8 plugins extending either EntityGenerate or EntityLookup in various migrations - some of which are regularly (cron) repeated.

heddn’s picture

FileSize
10.76 KB

Fix phpcs.

heddn’s picture

Status: Needs review » Reviewed & tested by the community

We'll do a new 5.x branch.

heddn’s picture

Version: 8.x-4.x-dev » 8.x-5.x-dev
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.