Consolidate CLI functionality into a service
Issue #2921721 on drupal.org by moshe weitzman.
Problem/Motivation
We are now double maintaining our Drush commands - Drush 8 and Drush 9. Let's move more logic into a shared CLI service so that duplicate code mostly eliminated.
Proposed resolution
Follow outline in this blog post from Nuvole as recommended by @moshe-weitzman
Remaining tasks
Create service for carrying out drush commands so logic can be consolidated in one place.Create stub functions for each migrate task in that service.Prove the service is usable by porting the Drush 9 migrate-import command to it.- Adapt the service to be usable by Drush 8 for the same command.
- Now the approach works, implement this approach for the remaining commands
- status
- rollback
- stop
- resetStatus
- messages
- fieldsSource
User interface changes
None
API changes
None
Data model changes
None