Active
Project:
Drupal core
Version:
main
Component:
database system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Oct 2019 at 22:28 UTC
Updated:
9 Oct 2019 at 01:34 UTC
Jump to comment: Most recent
Follow up to #2044435: Convert pager.inc to a service right now \Drupal\Core\Entity\Query\Sql\QueryFactory::get() instantiates a new class by calling QueryBase::getClass().
public function get(EntityTypeInterface $entity_type, $conjunction) {
$class = QueryBase::getClass($this->namespaces, 'Query');
return new $class($entity_type, $conjunction, $this->connection, $this->namespaces);
}This prevents any sub-class of query base using dependency injection.
Use the class resolver so we can use dependency injection.
Comments
Comment #2
andypost