Problem/Motivation
Could not instantiate Drupal\clamav\Drush\Commands\ClamavCommand: Too few arguments to function Drupal\Clamav\Drush\Commands\ClamavCommand::__construct(), 0 passed in /var/www/html/vendor/drush/drush/src/Runtime/ServiceManager.php on line 333 and exactly 3 expected
Steps to reproduce
Run this command using Drush 12.5.3:
drush clamav:scan-files -vvv
Proposed resolution
Update the module to use autowire instead of drush.services.yml
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | clamav-3518270-2.patch | 1.28 KB | john.oltman |
Comments
Comment #2
john.oltman commentedComment #3
abu-zakham commentedPatch #2 fixed the issue
Comment #4
jannakha commentedthank you for your contribution.
can you please create a fork and merge request
this will speed up review, testing and release process.
Comment #5
sokru commentedOnce #3502321: Add unit tests lands we can add tests also for Drush command, I already have some wip-tests based on that issue
Comment #6
mcdruid commentedLooking at:
* https://www.drush.org/13.x/dependency-injection/
* https://www.drush.org/13.x/install/
...it seems that the
drush.services.ymlapproach "is deprecated in Drush 12+ and removed in Drush 14."Drush 11 went EoL in Nov 2023.
However, would it do any harm to leave the services.yml file in place (alongside adding autowire) for a bit longer for BC?