Problem/Motivation
After updating to Drush v13 the sanitize command is no longer working for us.
Running with -vvv I see the output:
[debug] Could not instantiate Drupal\registration\Drush\Commands\RegistrationSanitizeCommands: Too few arguments to function Drupal\registration\Drush\Commands\RegistrationSanitizeCommands::__construct(), 0 passed in /app/vendor/drush/drush/src/Runtime/ServiceManager.php on line 360 and exactly 4 expected
Using drush.services.yml was deprecated in Drush 12 and no longer works.
Autowiring was added in 12.5 - https://www.drush.org/12.x/dependency-injection/#autowire
The create method was added in 11.6 https://www.drush.org/12.x/dependency-injection/#create-method
Looking at https://www.drush.org/13.x/install/#drupal-compatibility people could still be using 11?
I'm not sure the best way for the module to support multiple drush versions here but I will add a MR with a fix for 11.6 onwards.
Steps to reproduce
- PHP 8.3, Drush 13 & registration module
- Run drush sql:sanitize
- Observe the commands provided by this module are not in the list
Proposed resolution
TBC
Remaining tasks
TBC
User interface changes
n/a
API changes
n/a
Data model changes
n/a
Issue fork registration-3470617
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
Comment #3
ericgsmith commentedComment #5
ericgsmith commentedComment #6
john.oltman commentedLooks good, will test locally and assuming all good will get this merged - thanks for the work!
Comment #7
john.oltman commentedComment #9
john.oltman commentedI messed up the commit message but this has been committed to 3.2.x and will be in the next release. Will release 3.2.1 this weekend.
Comment #10
john.oltman commentedComment #11
john.oltman commentedThis has been released as part of https://www.drupal.org/project/registration/releases/3.3.0
Please use 3.3.x branch going forward.