Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Updated: Comment #5
Problem/Motivation
Even internally the entity manager might be a plugin manager, it does provide anything you would expect it to be.
Proposed resolution
Keep the service as 'plugin.manager.entity', but provide an alias of 'entity.manager'.
Remaining tasks
N/A
User interface changes
N/A
API changes
API addition: plugin.manager.entity and entity_manager will retrieve the same service
Related Issues
N/A
Comment | File | Size | Author |
---|---|---|---|
#38 | drupal8.entity-system.2057869-38.patch | 11 KB | andypost |
#35 | eneity_manager-2057869-35.patch | 106.15 KB | dawehner |
#31 | entity_manager-2057869-31.patch | 106.16 KB | dawehner |
#26 | entity_manager-2057869-26.patch | 106.95 KB | dawehner |
#23 | entity_manager-2057869-23.patch | 107.08 KB | dawehner |
Comments
Comment #1
dawehnerDamian had a wonderful idea!
Comment #2
damiankloip CreditAttribution: damiankloip commentedI would switch these round. /me hides
Comment #3
dawehnerWith a dot.
Comment #4
damiankloip CreditAttribution: damiankloip commentedSorry, I still think this should be switched round, all other plugin managers are plugin.manager.xx, so I think entity manager should still have this as its primary, with 'entity.manager' as the alias.
Comment #5
tim.plunkett#4, #3 does what you ask. I'll update the summary.
Comment #5.0
tim.plunkettupdated
Comment #7
tim.plunkettComment #8
damiankloip CreditAttribution: damiankloip commentedNo, #3 adds plugin.manager.entity as the alias?
Comment #9
tim.plunkettThe one with the definition is the canonical one. That is still 'plugin.manager.entity'.
#3 adds a new service ID called 'entity.manager' that is an alias for 'plugin.manager.entity'.
See http://symfony.com/doc/current/components/dependency_injection/advanced...., the one with "alias: " is the alias.
Comment #10
damiankloip CreditAttribution: damiankloip commentedYep, you're totally right, sorry! I was looking at the patch on my mobile, which turns out doesn't help that much.
Comment #12
tim.plunkett#3: drupal-2057869-3.patch queued for re-testing.
Comment #13
damiankloip CreditAttribution: damiankloip commentedAlways like an spl_object_hash() comparison :)
Looks good, small and simple enough, and has test coverage!
Comment #14
alexpottNeeds a reroll
Comment #15
jibranReroll.
Comment #16
alexpottCommitted 8c23138 and pushed to 8.x. Thanks!
Comment #17
dawehnerShould 'entity.manager' be the recommended way to access it?
Comment #18
yched CreditAttribution: yched commentedVery much +1.
(copy/paste my usual rant that the EntityManager isn't a plugin manager)
Comment #19
dawehnerLet's just also replace all instances.
Comment #21
dawehnerMaybe the problem is http://stackoverflow.com/a/10985500/637596, but this fixes the problem.
Comment #22
jibranPatch doesn't apply anymore.
Comment #23
dawehnerJust a rerole.
Comment #24
yched CreditAttribution: yched commentedYay.
Comment #25
alexpottYet again...
Comment #26
dawehnerJust another rerole.
Comment #27
yched CreditAttribution: yched commented:-)
Comment #28
jibranTagging. To avoid further rerolls.
Comment #29
dawehnerI really hate this tag personally, rerolling is simple.
Comment #30
alexpottWell the tag didn't get added and we need another reroll...
Comment #31
dawehner.
Comment #32
tim.plunkettRTBC if green.
Comment #33
damiankloip CreditAttribution: damiankloip commented+ 1, for the 10th time :)
Comment #34
alexpottNeeds a reroll
Comment #35
dawehnerThere we go.
613a370a5b4bbc22f07e1ac0b8ed87c5a0ecd030
Comment #36
jibranAnd back to RTBC.
Comment #37
alexpottCommitted 7742cc3 and pushed to 8.x. Thanks!
Comment #38
andypostThis needs follow-up patch
Comment #39
damiankloip CreditAttribution: damiankloip commentedNot in this issue, look at the title.
Comment #40
damiankloip CreditAttribution: damiankloip commentedComment #41
andypostFiled follow-up #2078847: Clean-up the rest of 'plugin.manager.entity' to 'entity.manager'
Comment #42
damiankloip CreditAttribution: damiankloip commentedPerfect.
Comment #43
jibranI have created #2084279: Remove plugin.manager.entity service in favor of entity.manager.
Comment #44.0
(not verified) CreditAttribution: commentedUpdate