Closed (fixed)
Project:
Drupal core
Version:
8.7.x-dev
Component:
entity system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Feb 2019 at 17:09 UTC
Updated:
1 Apr 2019 at 19:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
martin107 commentedIn a few classes such as FieldConfigListBuilder.php
entity_manager, was also being using in the class.
If entity_manager goes away this is maybe a breaking change for a contrib module - core has a convention for this
DeprecatedServicePropertyTrait and where appropriate I have made use of that
Comment #4
martin107 commentedMy goof-up was $entity__type_manager
that well known double underscore convention for creating errors.
Comment #5
berdirPlease always add the entity manager deprecation parent so the issues can be found easily. Also be careful to check the existing issues for overlaps, some are changing a lot of places.
This one is already in #3025427: Add @trigger_error() to deprecated EntityManager->EntityTypeBundleInfo methods I think.
You will notice that it's not always so easy, because often methods of entityManager were used that are now on different services.
That's why I'm currently working on deprecations grouped by the replacing service, like the issue above. But soon there's only EntityFieldManager and EntityTypeManager left, so in general +1 one updating all entity list builder classes together, but you might want to avoid overlaps with the above issue.
Comment #7
andypostre-roll after #3025427: Add @trigger_error() to deprecated EntityManager->EntityTypeBundleInfo methods and fix most of failures
Comment #8
andypostA bit more fixes and clean-up
Comment #9
andypostand the last one
Comment #11
berdirLooks good I think.
I think that injecting the entity storage is something we shouldn't do, and one case injects the list of entity type definitions, that's even weirder, but changing that is not in scope of this issue.
Comment #12
andypostFiled follow-up #3038302: Do not cache entity type definitions in EntityDisplayModeListBuilder
Comment #14
catchCommitted and pushed 9c547baa7e to 8.8.x and 15332e965d to 8.7.x. Thanks!