Compatibility with new version of migrate_tools

Created on 17 March 2025, 22 days ago

Problem/Motivation

In order to support PHP 8.4 and Drupal 11.1 I've updated to the latest migrate_tools dev version but this is not compatible with path_redirect_import.

When using the latest dev version of migrate_tools (commit https://git.drupalcode.org/project/migrate_tools/-/commit/a608e4b77057bd... on 6.0.x branch) and the latest stable version of path_redirect_import (2.1.0) I get this error when doing a drush cache clear:

PHP Fatal error:  Declaration of Drupal\path_redirect_import\Drush\Commands\PathRedirectImportCommands::create(Symfony\Component\DependencyInjection\ContainerInterface $container): Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands must be compatible with Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands::create(Symfony\Component\DependencyInjection\ContainerInterface $container): static in /var/www/web/modules/contrib/path_redirect_import/src/Drush/Commands/PathRedirectImportCommands.php on line 77

The issue is that migrate_tools src/MigrateToolsCommands.php now has new arguments in the constructor. The src/PathRedirectImportCommands.php in the path_redirect_import module is extending that class and should pass the correct and requirement arguments to the parent class.

Steps to reproduce

Proposed resolution

  • Adjust the src/PathRedirectImportCommands.php arguments so that all the required and correct arguments are passed to the parent class.
  • Adjust the service arguments in drush.services.yml accordingly.
  • Adjust the version requirement of migrate_tools accordingly (after the dev version has a new release).
πŸ“Œ Task
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands jaapjan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024