- Issue created by @Austin986
- 🇨🇦Canada Austin986
Corrected namespace
fromuse Drupal\migrate_tools\Commands\MigrateToolsCommands;
to
use Drupal\migrate_tools\Drush\MigrateToolsCommands;
- last update
about 1 year ago 2 fail After applying this patch I now get the following [similar] error:
Error: Class "Drupal\migrate_tools\Drush\MigrateToolsCommands" not found in include() (line 27 of /app/web/modules/composer/path_redirect_import/src/Commands/PathRedirectImportCommands.php)
Any suggestions?- Status changed to RTBC
about 1 year ago 11:24am 8 November 2023 - last update
about 1 year ago 3 pass - 🇪🇸Spain manuel garcia
I tested the #2 patch, verified the namespace and its the correct fix. The error is also gone once the change is applied.
@Ali_W, try verifying that the
web/modules/contrib/migrate_tools/src/Drush/MigrateToolsCommands.php
file is actually there perhaps. - last update
about 1 year ago 3 pass - leymannx Berlin
Setting back to active, since it's not only the include that needs to be fixed, but also the Drush command needs to be moved into
src/Drush
. - Status changed to Needs work
about 1 year ago 9:59am 13 November 2023 - Status changed to Needs review
about 1 year ago 10:35am 21 November 2023 - last update
about 1 year ago 3 pass - last update
about 1 year ago 3 pass - 🇪🇸Spain manuel garcia
Forgot to update the namespace on previous patch...
- leymannx Berlin
Oh, it looks like migrate_tools did it wrong. They put the command into src/Drush/ instead of src/Drush/Commands/. I asked them to reopen their Drush 12 issue: #3372643-12: Drush 12 support → .
- leymannx Berlin
After that we need to adjust the patch again. Although right now it's technically working.
-
plopesc →
committed 991d5806 on 2.0.x authored by
Austin986 →
Issue #3396112 by Austin986, Manuel Garcia: Drush 12 compatibility
-
plopesc →
committed 991d5806 on 2.0.x authored by
Austin986 →
- Status changed to RTBC
about 1 year ago 4:05pm 22 November 2023 - 🇪🇸Spain plopesc Valladolid
Patch merged including some bits from 🐛 Update to support path redirect import migrate_tools 6.0.2 RTBC
Could you please confirm whether this is working as expected for you in -dev version before tagging a new release?
Thank you!
- 🇨🇿Czech Republic Petr Illek
Hi Pablo,
I try to use the new dev version and it is no longer producing any errors while trying to export the config.
From that perspective it seems the issue is fixed. - 🇨🇭Switzerland pvbergen
I can confirm that these changes fix the problem on drupal/core:^10 after upgrade hooks have run.
I do however still encounter the issue when on 9.5. With path_redirect_import:dev-2.0.x#5e9f8317b9a01d249be9bc5c4d35523823e7b69d (newest commit) I still get the following error, both with drush 11 or 12:
[error] Error: Class "Drupal\migrate_tools\Drush\MigrateToolsCommands" not found in include() (line 28 of /project/app/public/modules/contrib/path_redirect_import/src/Drush/Commands/PathRedirectImportCommands.php) #0 /project/app/vendor/composer/ClassLoader.php(576): include() #1 /project/app/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}() #2 [internal function]: Composer\Autoload\ClassLoader->loadClass() #3 /project/app/vendor/drush/drush/src/Boot/DrupalBoot8.php(341): method_exists() #4 /project/app/vendor/drush/drush/src/Boot/DrupalBoot8.php(324): Drush\Boot\DrupalBoot8->hasStaticCreateFactory() #5 /project/app/vendor/drush/drush/src/Boot/DrupalBoot8.php(253): Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands() #6 /project/app/vendor/drush/drush/src/Boot/BootstrapManager.php(291): Drush\Boot\DrupalBoot8->bootstrapDrupalFull() #7 /project/app/vendor/drush/drush/src/Boot/BootstrapManager.php(432): Drush\Boot\BootstrapManager->doBootstrap() #8 /project/app/vendor/drush/drush/src/Boot/BootstrapManager.php(384): Drush\Boot\BootstrapManager->bootstrapToPhaseIndex() #9 /project/app/vendor/drush/drush/src/Boot/BootstrapHook.php(32): Drush\Boot\BootstrapManager->bootstrapToPhase() #10 /project/app/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php(44): Drush\Boot\BootstrapHook->initialize()
To make path_redirect_import work for the upgrade from 9.5 to 10, I need to use:
- https://git.drupalcode.org/project/path_redirect_import/-/merge_requests/21
- path_redirect_import:dev-2.0.x#8e1ec6a9241b46b4f597c44edddd4db368daabd9Revision comparison: https://git.drupalcode.org/issue/path_redirect_import-3373025/-/compare/...
I'm not quite sure why this is, maybe somebody can elaborate. The only difference I could find is the location of the Drush command (Drupal\path_redirect_import\Commands\PathRedirectImportCommands vs. \Drupal\path_redirect_import\Drush\Commands\PathRedirectImportCommands).
For now, I can use the above combination to make the upgrade work and then switch to dev-2.0.x once I'm on D10.
- 🇪🇸Spain manuel garcia
Thanks @ploplesc!
Could you please confirm whether this is working as expected for you in -dev version before tagging a new release?
I did that just now, my findings
- Removed the previous patch
- Switched to using
dev-2.0.x
- Ran composer install
- Cleared caches
- Ran
drush prie
- got me a valid link, serving a valid csv file. - Ran
drush prii
no errors but i didn't try actually importing a file.
No errors are coming up if I run
drush status
or anything similar. - 🇦🇺Australia pasan.gamage
For me to resolve this error had to downgrade to Drush 11
Apply patch from https://www.drupal.org/project/path_redirect_import/issues/3373025 🐛 Update to support path redirect import migrate_tools 6.0.2 RTBC
"Update to support path redirect import migrate_tools 6.0.2": " https://www.drupal.org/files/issues/2023-07-06/path_redirect_import-3373... → " - Open on Drupal.org →Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7last update
about 1 year ago Not currently mergeable. - First commit to issue fork.
- Open on Drupal.org →Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7last update
about 1 year ago Not currently mergeable. - Open on Drupal.org →Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7last update
about 1 year ago Not currently mergeable. - Status changed to Fixed
about 1 year ago 8:58am 6 December 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
12 months ago 9:53pm 22 December 2023 - leymannx Berlin
migrate_tools command has now been moved into the correct place, see 📌 Move Drush commands from src/Drush/ to src/Drush/Commands/ Fixed . We need to adjust the statement again.
Please reopen.
- 🇪🇸Spain plopesc Valladolid
Thank you for the heads-up @leymannx!
Changes already applied against -dev release.
I'll roll a stable release once Migrate Tools new stable release includes the referenced changes.