Problem/Motivation
I got this error when I ran "drush pqa everything -y"
In QueueCommands.php linke 200:
"There is no purger supporting 'Array' Please install one!"
Steps to reproduce
1. update purge from 3.5 to 3.6 in D10.2.7 with Drush 12.4.3
2. drush updb && drush cr
3. drush pqa everything -y
Proposed resolution
The main issue is caused by setting "expression" argument as array then the argument passes to "queueAddParseExpressions" function again.
So, I proposed to add if condition for checking argument type at the top of function logic like below:
public function queueAddParseExpressions(InputInterface $input, AnnotationData $annotationData) {
if (isset($input->getArguments()['expressions'][0]['type'])) {
return;
}
$raw = trim(implode(" ", $input->getArguments()['expressions']));
Remaining tasks
If 3.6 works in D10.3.x, please set core_version_requirement for Drupal compatibility.
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 3460094-remove_drush_services_yml.patch | 2.01 KB | andyg5000 |
| #5 | 3460094-5-there-is-no-purger-supporting-array.patch | 1.92 KB | silverham |
Issue fork purge-3460094
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 #2
parkh commentedComment #3
parkh commentedComment #4
parkh commentedComment #5
silverham commentedAttaching patch uses static variable instead, so format is not locked in. not sure why it added twice though.
Comment #6
silverham commentedComment #7
parkh commentedComment #8
parkh commented@silverham, the patch works for me. thank you.
Comment #9
andyg5000The init hook is getting registered twice by Drush because of a drush.services.yml and the auto-discovery service that Drush invokes. We should remove the command in drush.services.yml and let the auto-discovery handle registering the commands.
I would like the module maintainers to review this before making an MR because there are several commands that are impacted by this.
Comment #10
andyg5000Here's a temp patch I'm using for now until we can get the module maintainers eyes on this. I don't think we need to reference any of the drush.services.yml stuff and removing it fixes the duplicate hook registrations.
Comment #11
lisotton commentedI'm also facing this issue and it took me hours to realize that the issue was the auto-discovery + the drush.services.yml.
@andyg5000 your patch #9 is working fine, so why not moving this ticket to RTBC?
Maybe we can speed up and catch more attention from the maintainers if you also open a MR in Gitlab.
Comment #12
piotr pakulski#10 works for us as well
Comment #13
berenddeboer commentedAnd working for me, please add this, this took me way to long to figure out.
Comment #15
lisotton commentedI created a MR with solution #10.
Comment #16
liam morland