Problem/Motivation

New modules, which are compatible with Drupal 10 and higher versions are expected to include type declarations in property definitions, and use constructor property promotion.

  /**
   * Get the migration plugin manager.
   *
   * @var \Drupal\migrate\Plugin\MigrationPluginManagerInterface|object|null
   */
  protected MigrationPluginManagerInterface $migrationPluginManager;

  /**
   * {@inheritdoc}
   */
  public function __construct(MigrationInterface $migration, MigrateMessageInterface $message, array $options = []) {
  /**
   * Plugin manager for migration plugins.
   */
  protected MigrationPluginManagerInterface $migrationPluginManager;

  /**
   * The logger service.
   *
   * @var \Psr\Log\LoggerInterface
   */
  protected LoggerInterface $logger;

  /**
   * The http client.
   *
   * @var \GuzzleHttp\Client
   */
  protected Client $httpClient;

  /**
   * Constructs a new MigrationExecuteForm object.
   *
   * @param \Drupal\migrate\Plugin\MigrationPluginManagerInterface $migration_plugin_manager
   *   The plugin manager for config entity-based migrations.
   * @param \Psr\Log\LoggerInterface $logger
   *   The logger service.
   * @param \GuzzleHttp\ClientInterface $http_client
   *   The Guzzle HTTP client.
   */
  public function __construct(
    MigrationPluginManagerInterface $migration_plugin_manager,
    LoggerInterface $logger,
    Client $http_client,
  ) {
    $this->migrationPluginManager = $migration_plugin_manager;
    $this->logger = $logger;
    $this->httpClient = $http_client;
  }

Proposed resolution

Review and update the module code to comply with Drupal 10+ standards.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

juandels3 created an issue. See original summary.

juandels3’s picture

Assigned: Unassigned » juandels3

  • juandels3 committed 00b6e1c2 on 1.0.x
    refactor: #3571693 Use constructor property promotion and type...
juandels3’s picture

Status: Active » Needs review
juandels3’s picture

Status: Needs review » Reviewed & tested by the community
juandels3’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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