Remove DrushBatchContext type hints from runBatchInitializeStep

Created on 29 January 2024, 10 months ago
Updated 12 February 2024, 9 months ago

I'm getting a type error when trying to run drush cached-moderation-state:update-all with Drush 12

TypeError: Drupal\cached_moderation_state\Commands\CachedModerationStateCommands::runBatchInitializeStep(): Argument #4 ($context) must be of type DrushBatchContext, array given

Drush has removed the DrushBatchContext wrapper
https://github.com/drush-ops/drush/pull/5353

Proposed resolution

The type hit should be array, but that may break compatibility with older Drush versions. I think it will be better to remove the type hinting for now

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡·Argentina matias

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024