Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
entity system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Mar 2013 at 20:23 UTC
Updated:
29 Jul 2014 at 22:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
berdirInstructions:
Search & replace all calls to entity_query() with the mentioned method. Note that calls within namespaced classes (have a namespace line and are in the lib/ folder) needs to be "\Drupal".
Comment #2
dawehnerWhat should we do with entity_query_aggregate()?
Comment #3
berdirGood question. That function doesn't seem to be used anywhere?
Comment #4
dawehnerGood question!
No, not at all. Let's drop that in this issue.
Comment #5
xjmPostponing on the main issue.
Comment #6
damiankloip commentedComment #7
berdirI guess this should either not use "a" or something like "an entity query".
Comment #8
damiankloip commentedChanged that comment.
Comment #9
dawehnerAs written before, I think we should get rid of this wrapper function.
Comment #10
damiankloip commentedI think maybe it's better if we deal with entity_query_aggregate() in a follow up?
Comment #11
dawehnerThere is noone using this procedural function at the moment, so the longer it sticks in, the more people might use it, even they shouldn't,
but yeah I don't really care.
Comment #12
damiankloip commentedI have removed any changes to entity_query_aggregate and created another issue for that, #1960882: Remove entity_query_aggregate function with a Drupal class method.
Comment #13
ParisLiakos commentedlets replace those too
Comment #14
damiankloip commentedNot sure, we can't use entityQuery() if we want the factory?
Comment #15
ParisLiakos commenteduh oh, sorry totally missed the argument is missing:P
RTBC!
Comment #16
chx commentedSure, go ahead...
Comment #17
webchickI really don't think this belongs on the Drupal class. it feels like it belongs on an Entity class instead. Thoughts?
Comment #18
xjm#12: 1957148-12.patch queued for re-testing.
Comment #19
damiankloip commentedIt seems the issue in the summary was the place to be discussing that :)
Comment #20
berdirWe discussed that in IRC too at some point. I generally agree, but there are some questions that need to be answered to be able to do that.
- How should that class be named and in which namespace should it live? We already have Drupal\Core\Entity\Entity which is the base class for all entity types, we'd have to rename that to EntityBase or EntityTypeBase first if we want to use that. @msonnabaum also suggested just Drupal\Core\Entity to avoid duplicating the namespace and classnames but I'm not sure about placing classes directly in Drupal\Core. We already have quite a few but it's not a component on its own so it somehow feels wrong. @Crell?
- We also have the EntityManager, which is the entity type plugin manager and e.g. responsible for returning entity controllers/handlers and later on possibly also creating of new entities and entity field definitions. Might not be trivial to separate these two and explain the difference between them?
Comment #21
Crell commentedThe classes in \Drupal\Core directly fall into 2 categories:
1) They're so foundational that they don't have a "sub" system.
2) We haven't gotten around to putting them into a subsystem yet but should. (All of the Controller stuff is in that category.)
The entity system is definitely a subsystem of its own, so it doesn't count as class 1.
Per Angie's comment in #17, at least this week the Entity system is in /core/lib, so it's part of the core framework toolchain. That means \Drupal:: is a reasonable place to put its legacy service wrapper, IMO. It would only need an \Entity:: static if it were in a disable-able module.
Comment #23
damiankloip commentedAs per webchick's request in #1960882: Remove entity_query_aggregate function with a Drupal class method. Adding the entity query aggregate changes here too.
Comment #24
chx commentedComment #25
alexpottCommitted bea3588 and pushed to 8.x. Thanks!
Think this might need a change notice.
Comment #26
damiankloip commentedUpdated these:
http://drupal.org/node/1827278
http://drupal.org/node/1918702
http://drupal.org/node/1902034
http://drupal.org/node/1882418
Comment #27
berdirUpdated change notices look good to me.
Comment #28
berdirRemoving tag.
Comment #29
andypostThis needs change notice
Comment #30
jibranAll the change notification were updated in #26. Issue link is also added now. Do you want separate change notification for this issue?
Comment #31
andypostSeems update is enough, but we need a common way to alert other issues with simmilar changes
Comment #32
damiankloip commentedThat sounds like a messy way to go down, and maybe not worth the effort? I would say the amount of existing change notices that need updating in this way is a little more rare.
@andypost, do you want to create a followup to discuss that idea further?
Comment #33
andypostFiled #1974860: Figure out a better way to announce core refactorings
Comment #34
andypostTagged