method/Class QueryFactory is deprectaed

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chaitanya17 created an issue. See original summary.

chaitanya17’s picture

Assigned: chaitanya17 » Unassigned
Status: Active » Needs review
FileSize
5.4 KB

Please check attached working patch.

chaitanya17’s picture

FileSize
3.01 KB

Please check latest attached working patch.

imyaro’s picture

Status: Needs review » Needs work
  1. +++ b/modules/crm_core_match/src/Plugin/crm_core_match/field/FieldHandlerBase.php
    @@ -54,19 +54,19 @@
       /**
        * A Contact query object.
        *
    -   * @var \Drupal\Core\Entity\Query\QueryFactory
    +   * @var \Drupal\Core\Entity\EntityTypeManager
        */
    -  protected $queryFactory;
    +  protected $entityTypeManager;
    

    Seems old comment left by mistake.

  2. +++ b/modules/crm_core_match/src/Plugin/crm_core_match/field/FieldHandlerBase.php
    @@ -149,7 +149,7 @@
    +    $query = $this->entityTypeManager->getStorage('crm_core_individual')->getQuery();
    
    +++ b/modules/crm_core_match/src/Plugin/crm_core_match/field/NameFieldHandler.php
    @@ -69,7 +69,7 @@
    +      $query = $this->entityTypeManager->getStorage('crm_core_individual')->getQuery();
    

    Probably if will be better to pass storage itself instead of the entity_type.manager?

As for me - needs work.

RoSk0’s picture

Component: Code » CRM Core Match

  • grahl committed 426fae9 on 8.x-1.x authored by chaitanya17
    Issue #2894218 by chaitanya17, zvse: method/Class QueryFactory is...
grahl’s picture

Status: Needs work » Fixed

Kept it at the type manager instead of storage since the overhead was minimal. Updated the comment and relaxed the constructor to rely on EntityTypeManagerInterface.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.