Skip to content
Snippets Groups Projects

\Drupal::state()-get()/set() to Drupal::keyValue()->get()/set()

Open spokje requested to merge issue/drupal-3496319:3496319-random-test-failure into 11.x
1 unresolved thread

Closes #3496319

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 services:
2 user_hooks_test.user_hooks_test:
  • we don't even use it for most core module hooks yet. Not sure this is true, this one, for example used DI for the original State.

    I think we should just drop dependency injection from the test code for this one Makes sense, although I somehow can't get this to work. Tried several approaches and always end up with a variation of this error message:

    Symfony\Component\DependencyInjection\Exception\RuntimeException: Cannot autowire service "Drupal\user_hooks_test\Hook\UserHooksTest": argument "$keyvalue" of method "__construct()" references interface "Drupal\Core\KeyValueStore\KeyValueFactoryInterface" but no such service exists. You should maybe alias this interface to one of these existing services: "keyvalue", "keyvalue.database", "keyvalue.expirable".
  • spokje added 51 commits

    added 51 commits

    Compare with previous version

  • spokje added 1 commit

    added 1 commit

    Compare with previous version

  • closed

  • Please register or sign in to reply
    Loading