Drush broken with Smart Date 3.7-rc2

Created on 29 January 2023, about 2 years ago
Updated 21 February 2023, about 2 years ago

Problem/Motivation

As I upgraded from 3.6 to 3.7-rc2 that fixed query access check bug I notice that drush is now broken with error message:

ArgumentCountError: Too few arguments to function Drupal\smart_date\Commands\SmartDateDrushCommands::__construct(), 0 passed in /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 and exactly 3 expected in /app/web/modules/contrib/smart_date/src/Commands/SmartDateDrushCommands.php on line 41 #0 /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php(259): Drupal\smart_date\Commands\SmartDateDrushCommands->__construct()

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Postponed: needs info

Version

3.7

Component

Code

Created by

🇫🇮Finland simohell

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

Comments & Activities

  • Issue created by @simohell
  • Status changed to Postponed: needs info about 2 years ago
  • 🇨🇦Canada mandclu

    Some steps to reproduce would be helpful here, as well as a description of what steps have already been attempted to fix it.

    Based on the error message I'd say that the issue is related to the move to dependency injection in 💬 \Drupal calls should be avoided in classes, use dependency injection instead Fixed . If I recall correctly, I did have to aggressively clear the caches, possibly even doing a manual truncate on the cache tables. Please try some cache clearing methods and let me know if that helps.

  • 🇺🇸United States will kirchheimer New Orleans

    Had same problem after a version update. (3.5.1 to 3.7.0)
    Resolve with:
    drush cr
    drush cex

  • 🇫🇮Finland simohell

    I can confirm this is was a cache issue and seem to have been resolved by some combination of clearing caches and stopping/starting containers. I'll leave status as is for now, as I don't currently have the issue with the site I'm working on, but not sure which steps fixed it.

  • 🇨🇦Canada mandclu

    Thanks for the additional feedback. Moving this to a support request, unless a needed code change can be identified.

Production build 0.71.5 2024