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.
EntityManager is depreciated in 8.0 so we should be using EntityTypeManager in the code base
Comment | File | Size | Author |
---|---|---|---|
#8 | Removing-deprecated-entitymanager-2869382-8.patch | 3.22 KB | prathibhab.cdac |
#5 | Removing-deprecated-entitymanager-2869382-4.patch | 3.79 KB | jeetendrakumar |
#2 | 2869382-2.patch | 3.66 KB | Pavan B S |
Comments
Comment #2
Pavan B S CreditAttribution: Pavan B S at Valuebound commentedApplying the patch, please review.
Comment #3
Peter MajmeskuFirst of all: thanks for providing a patch. Yes, the EntityManager is deprecated.
However, your patch is not complete. If I apply your patch and save an new taxonomy term via the form, I get this error:
What I can see so far is, that the module's services aren't modified according to the EntityTypeManager in permissions_by_term.services.yml.
Please solve this and test PbT's functionality after your implementation.
Comment #4
jeetendrakumar CreditAttribution: jeetendrakumar as a volunteer and at HyTechPro.com commentedComment #5
jeetendrakumar CreditAttribution: jeetendrakumar as a volunteer and at HyTechPro.com commentedPlease find updated patch file.
Comment #6
jeetendrakumar CreditAttribution: jeetendrakumar as a volunteer and at HyTechPro.com commentedComment #7
bapi_22 CreditAttribution: bapi_22 at Cybage Software Pvt Ltd. commentedHi jeetendrakumar,
It seems, you have not change the parameters in services.yml files. It should be like
permissions_by_term.access_check:
class: Drupal\permissions_by_term\AccessCheck
arguments: ['@entity_type.manager', '@database']
permissions_by_term.node_access:
class: \Drupal\permissions_by_term\NodeAccess
arguments: ['@permissions_by_term.access_storage', '@permissions_by_term.node_access_record_factory', '@entity_type.manager', '@permissions_by_term.access_check', '@database']
Also note that getFieldDefinition is not a method under EntityTypeManager Class. Please call this method from \Drupal\Core\Entity\EntityFieldManagerInterface
Thanks
Comment #8
prathibhab.cdac CreditAttribution: prathibhab.cdac commentedPatch with parameter updated in services.yml
Comment #9
bapi_22 CreditAttribution: bapi_22 at Cybage Software Pvt Ltd. commentedComment #11
Peter MajmeskuI have applied the patch on the dev branch. Thanks!