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

Issue fork purge-3460094

Command icon 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

parkh created an issue. See original summary.

parkh’s picture

Issue summary: View changes
parkh’s picture

Issue summary: View changes
parkh’s picture

Issue summary: View changes
silverham’s picture

Attaching patch uses static variable instead, so format is not locked in. not sure why it added twice though.

silverham’s picture

Status: Active » Needs review
parkh’s picture

parkh’s picture

@silverham, the patch works for me. thank you.

andyg5000’s picture

Priority: Normal » Major
Status: Needs review » Needs work

The 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.

andyg5000’s picture

StatusFileSize
new2.01 KB

Here'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.

lisotton’s picture

Status: Needs work » Reviewed & tested by the community

I'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.

piotr pakulski’s picture

#10 works for us as well

berenddeboer’s picture

And working for me, please add this, this took me way to long to figure out.

lisotton’s picture

I created a MR with solution #10.

liam morland’s picture

Version: 8.x-3.6 » 8.x-3.x-dev