Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
flag.services.yml includes the following line:
flag:
class: Drupal\flag\FlagService
arguments: ['@plugin.manager.flag.flagtype', '@event_dispatcher', '@entity.query', '@current_user', '@entity.manager']
FlagService takes the entity type manager, not the entity manager as the last argument. The wrong service is being injected.
Proposed resolution
Change @entity.manager to @entity_type.manager.
Remaining tasks
Create patch.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#2 | wrongTagFlagService.2.patch | 620 bytes | socketwench |
|
Comments
Comment #2
socketwench CreditAttribution: socketwench at FFW commentedComment #3
martin107 CreditAttribution: martin107 commentedI guess that little nasty crept in while the deprecated entity_manager was being swapped out....
A little time bomb just biding its time
Good catch
Comment #4
BerdirLooks fine.
It's a pretty slow time bomb though, since EntityManager will not be removed before Drupal 9 and who knows that will happen then ;)
Comment #6
socketwench CreditAttribution: socketwench at FFW commentedThanks everyone!