Skip to content
Snippets Groups Projects

Issue #3206932: Rename targetEntityType constant in d6_view_mode migration to...

Issue #3206932: Rename targetEntityType constant in d6_view_mode migration to...

Issue #3206932: Rename targetEntityType constant in d6_view_mode migration to simplify source plugin

Closes #3206932

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
71 71 public function calculateDependencies() {
72 72 $this->dependencies = parent::calculateDependencies();
73 73 if (isset($this->configuration['constants']['targetEntityType'])) {
74 @trigger_error('The constant targetEntityType is deprecated in drupal:9.2.0 and is removed in drupal:10.0.0. Use entity_type instead. See https://www.drupal.org/node/3208135', E_USER_DEPRECATED);
  • I think for proper BC here this method should become:

        if (isset($this->configuration['constants']['targetEntityType'])) {
          @trigger_error('The constant targetEntityType is deprecated in drupal:9.2.0 and is removed in drupal:10.0.0. Use entity_type instead. See https://www.drupal.org/node/3208135', E_USER_DEPRECATED);
          $this->configuration['constants']['entity_type'] = $this->configuration['constants']['targetEntityType'];
        }
        $this->dependencies = parent::calculateDependencies();
        return $this->dependencies;

    That way code can rely on entity_type being set and everything working off of that as it will once we remove

        if (isset($this->configuration['constants']['targetEntityType'])) {
          @trigger_error('The constant targetEntityType is deprecated in drupal:9.2.0 and is removed in drupal:10.0.0. Use entity_type instead. See https://www.drupal.org/node/3208135', E_USER_DEPRECATED);
          $this->configuration['constants']['entity_type'] = $this->configuration['constants']['targetEntityType'];
        }
  • Please register or sign in to reply
  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 0951fb58 - Revert "Applied suggestions."

    Compare with previous version

  • Please register or sign in to reply
    Loading