\Drupal::state()-get()/set() to Drupal::keyValue()->get()/set()
1 unresolved thread
Closes #3496319
Merge request reports
Activity
1 services: 2 user_hooks_test.user_hooks_test: changed this line in version 3 of the diff
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".
added 51 commits
-
483e3ee3...78ec304c - 50 commits from branch
project:11.x
- eccee6e1 - \Drupal::state()-get()/set() to Drupal::keyValue()->get()/set()
-
483e3ee3...78ec304c - 50 commits from branch
Please register or sign in to reply