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.
$flag_service = \Drupal::service('flag');
We shouldn't be calling out to the service container within a class that is itself a service.
Comments
Comment #1
joachim CreditAttribution: joachim commentedPossibly not needed with #2479813: FlagCountManagerInterface::getCounts() should take an EntityInterface.
Comment #2
joachim CreditAttribution: joachim commented