Remove anti-pattern in StatisticsLastUpdated.php

Created on 27 December 2023, 6 months ago

Problem/Motivation

Follow up to MR comment.

In core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php:

public function __construct(array $configuration, $plugin_id, $plugin_definition, DateFormatterInterface $date_formatter, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $date_formatter, $entity_type_manager->getStorage('date_format'));
Can we get a follow-up to remove this from this class and the parent - its an anti-pattern - see https://mglaman.dev/blog/dependency-injection-anti-patterns-drupal
πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
CommentΒ  β†’

Last updated 2 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States capysara

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

Comments & Activities

Production build 0.69.0 2024